I have crystal report with multiple sub reports and section on master report with product ids. When user provides only one product id then report runs fine and loads/shows data in correct time. When user provides multiple product ids then first page is fetched correctly and shown in time. When we press on next page the report takes time to show the data. We haven’t specified On-Demand Sub report run which means it is supposed to fetch data with the main report. If it has already fetched data why it takes long time to show the report?
We dont know how to resolve this delay in report load.
I have also one question here. When exactly the sub report will be refreshed when “On-Demand sub report” is disabled?
Please suggest your ideas to over come this issue.
Subreports are processed when the section they’re place in is displayed. And On-Demand subreport is processed when the user clicks on a link to display it. Also, subreports run a query every time they are run - data is not “shared” between subreports. For example, if you have a subreport in a group footer, that subreport will run its query at the end of every group.
The best way to avoid the slowness is to avoid subreports when possible. However, there are times when you have to have them. At that point you need to make sure that the query is as efficient as possible. You do this by taking the following steps in the subreport:
Turn on Use Indexes or Server for speed.
Turn on Perform Grouping on Server.
Avoid Crystal formulas in the record selection criteria, sorts, or groups. One possible way to avoid this is to use SQL Expressions, another is to base the subreport on a command instead of using tables/views in Crystal.
Don’t include any tables that are not absolutely required for the data you’re displaying.