Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Accessing data for every viewed page 1

Status
Not open for further replies.

Scrye

MIS
Nov 6, 2002
23
US
I am working with a report that is to produce a customer's billing statement. Within the statement I have a subreport in group header 1a. This subreport is needed to gather a total dollars owed so it can be placed in the header (the footer total is calculated from the main report detail). The problem is not the subreport (at least I don't think it is). The problem I am having is the amount of time it takes to run the report and advance forward to the next page.

The report takes about 5 minutes to pull in the data and if I advance 10 pages (1 page per statement) it takes 5 minutes to open page 10.

From the status bar within CRXI I can see that it is accessing the data for the main report and subreport. Is there a way to have CR bring in the data and only use the data saved for the report when advancing through the pages?

The databases are dbaseIII. The largest file is 300M but I am only looking at last months data (from 2/1 - 2/28) so my selection criteria only brings in a small set of the data. The subreport links are the customer number and the date range from the main report.

Any suggestions?

Thank you in advance for your help!

-CP
 
The main report has to retrieve all of its data before the first subreport is run. Each subreport runs its own separate query, but not until you preview the page for each subreport.

So the delay you see between pages is clearly the subreports. You could force Crystal to run all the subreports before the first page is displayed by putting a "Page N of M" field on the report. This will make the first page take a very long time to show up but then there will be no delay between pages.

The real answer here is to make sure that your filter is using an indexed field. You would certainly want an index on the date field. Without that index it is likely that your subreport queries are doing a serial read of all records before they can find the data that you want.

Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guides to Formulas, Parameters, Subreports, Cross-tabs, VB, Tips and Tricks
 
I am revamping an old report that someone else wrote and I have had to clean up a lot areas that was pulling too much data or not enough. There were 3 subreports on this report to begin with and I have narrowed them to one.

I thought maybe that it was due to the size of the dbf file I am working with and from what you stated it looks like that it is both the subreport and the size. There are indexes for this data but unfortunately one of them is not the date field.

Thank you for the information. It was very helpful. Especially the tip about the page n of m.

-CP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top