473,386 Members | 1,943 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Report performance question

A97.

I have a landscape report with 4 sub-reports. All reports including the main
report use the same recordsource.

The LinkMasterFields and LinkChildFields properties for all sub-reports
read:

ClientName;JobID;JobID;JobID;

In this case the dynamic report is grouping on Client name only. The other 3
grouping levels are there in case the user wants to use them.

Now, when I run the report with 400 Job records in the database it takes 11
seconds to load. This is OK since the report is 56 pages long and has quite
a bit of formatting code.

However, when the report is run with 5000 records, it takes over one minute.
The thing is that it is still only 56 pages long since the report filters
out Jobs are finished, i.e. IsNull([FinishedDate])=False -- 4600 jobs are
actually finished leaving 400 jobs to report on.

I have a myriad of indexes including:

Index 1: FinishedDate

Index 2: ClientName

Index 3: JobID

Index 4: FinishedDate, JobID

Index 5: ClientName, FinishedDate

The question is, why does the report take longer to run even though the same
amount of records are being reported on? Any thoughts?

TIA
Mark
Nov 13 '05 #1
4 1288
Mark 123 wrote:
The question is, why does the report take longer to run even though the same amount of records are being reported on? Any thoughts?

TIA
Mark


Try putting the IsNull([FinishedDate]) = False from your Filter into
the report recordsource as:
"AND [FinishedDate] IS NOT NULL"

There was a discussion about this recently. Using the recordsource
might pull just the records needed. The filter might pull all the
records in the recordset (including calculations) before applying the
filter criterion. Try it out and let us know. Note that if your
dynamic report relies on changing the filter you can set the report's
recordsource dynamically instead.

James A. Fortune

Nov 13 '05 #2
It was in the recordsource anyway:

WHERE (((tblJobs.DateCompleted) Is Null) AND
((tblReportsTeamWorkloadDialogSubformSource.LimitT oSelect) Like
IIf([forms]![frmReportOptionsTeamWorkloadWorkform]![Sub0].[Form]![SelectTeam
Member].[Value]=-1,True,'*')));

<ji********@compumarc.com> wrote in message
news:11*********************@f14g2000cwb.googlegro ups.com...
Mark 123 wrote:
The question is, why does the report take longer to run even though

the same
amount of records are being reported on? Any thoughts?

TIA
Mark


Try putting the IsNull([FinishedDate]) = False from your Filter into
the report recordsource as:
"AND [FinishedDate] IS NOT NULL"

There was a discussion about this recently. Using the recordsource
might pull just the records needed. The filter might pull all the
records in the recordset (including calculations) before applying the
filter criterion. Try it out and let us know. Note that if your
dynamic report relies on changing the filter you can set the report's
recordsource dynamically instead.

James A. Fortune

Nov 13 '05 #3
Mark 123 wrote:
It was in the recordsource anyway:

WHERE (((tblJobs.DateCompleted) Is Null) AND
((tblReportsTeamWorkloadDialogSubformSource.LimitT oSelect) Like
IIf([forms]![frmReportOptionsTeamWorkloadWorkform]![Sub0].[Form]![SelectTeam Member].[Value]=-1,True,'*')));


Hmmm. That IIf looks like a good candidate for optimization. I'd
create the SQL string in VBA and get rid of it.

James A. Fortune

Nov 13 '05 #4
Excellent tip thanks.

On the other issue, I think we have found the cause.

The report recordsource SQL had a sub-query in it. This sub-query doesn't
have any WHERE criteria limiting it to where (tblJobs.DateCompleted) Is
Null).

It appears that Jet doesn't pass, through inheritance, the criteria to the
subquery. When I manually inserted the WHERE clause into the sub-query, the
report ran just as fast.

Thanks for your help too.
<ji********@compumarc.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
Mark 123 wrote:
It was in the recordsource anyway:

WHERE (((tblJobs.DateCompleted) Is Null) AND
((tblReportsTeamWorkloadDialogSubformSource.LimitT oSelect) Like

IIf([forms]![frmReportOptionsTeamWorkloadWorkform]![Sub0].[Form]![SelectTeam
Member].[Value]=-1,True,'*')));


Hmmm. That IIf looks like a good candidate for optimization. I'd
create the SQL string in VBA and get rid of it.

James A. Fortune

Nov 13 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: The Eeediot | last post by:
Hello, SQL gurus! This message use HTML tables (in case you see a bunch of gobbledy-gook). I need to modify an SQL statement: SELECT DISTINCT Trim(InvtID)+', '+Trim(Descr) AS Item, month,...
2
by: Gary | last post by:
I am working with a report generator that is based on SQL Server 2000 and uses ASP as the UI. Basically we have a set of reports that end users can execute through a web browser. In general the...
2
by: Dan Williams | last post by:
We have a bookings table that records various information and for each booking we record various events that users have performed on that booking along with when the event occurred. For...
2
by: GC | last post by:
HI, I'am using Crystal Report with visual Studio .NEt 2003 When i make a report using a store procedure, I can not see all the fields of the store proc and i'm suppose to see those fields. I'm...
5
by: Terri | last post by:
I have a form with a multi-select combo. I dynamically build a SELECT statement, open a report, and set the recordsource to my dynamic SELECT statement. I count the records returned in the report...
3
by: deejayquai | last post by:
Hi I've created a crosstab query and displayed it as a sub-report in my main report. This is fine until the data changes and the column names become incorrect. I know I have to create a...
4
by: Jana | last post by:
Hi! I have an Access 97 report based on tables linked to an SQL back end. The report has 5 subreports in it (unfortunately unavoidable due to the nature of the report) and performance is quite...
0
by: kamboj.shalabh | last post by:
Hi to all, Well, I am working on dotnet 2005 with crystal reports 10 and backend as sql server. I am facing a problem while loading a report. Actually the issue is, when I load report it takes...
6
by: Bjorn Sagbakken | last post by:
Hi I have done some work with VS 2005 but no report-issues yet. Now I want to step up, and implement reports for printing and PDF export. I have just briefly studied the build-in report...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.