Showing results for 
Search instead for 
Did you mean: 

Limit Crystal report preview to first page or ten records?

Former Member
0 Kudos

Our application uses the Crystal 2008 RAS API in VB.NET platform to generate Crystal reports. Our reports use the PULL model and we supply the database credentials at run time and the report connects directly with the report via OLE DB.

I am in process adding a new functionality where in the users will have the option to see a limited thumbnail preview of the report before actually previewing/printing the report.

I am looking for way by which I can control the preview to just one page of the report so that the report thumbnail loads quicker as I am only interested in showing the users the layout of the report and the actual data is not important.

Is there a way to control the preview to first page or first ten records. "PageNumber" and "RecordNumber" do not work in the selection formula as they have later evaluation times.

I was thinking about manipulating the first record set field in the report to change it to Group record sort and set the sort direction to TopN of 10 rows at runtime.

Also, if i could extract the actual SQL of the report, there are possibilities there to set to Where condition to it.

Please advice on what is the best way to accomplish this. Remember, my goal is negligible load time for the report and the thumbnail just needs to reflect the data layout of the report.

Accepted Solutions (1)

Accepted Solutions (1)

Active Contributor
0 Kudos

If you're just looking for data layout, why not use "saved data" reports? In this way, you save your self the time it takes to connect to the db, retrieve data, format the report, etc., etc. Once the user decides they want a certain report, you refresh it, connect to the db and get the report to the screen or what ever.

Remember that the first load of a report will always be slow due to the runtime loading, initializations, etc. If you want to eliminate the first load delay, you'll have to pre-load the runtime by loading a report behind the scenes - perhaps on app load(?).


Follow us on Twitter

Got Enhancement ideas? Try the [SAP Idea Place|]

Former Member
0 Kudos

I had already tried the Reports saved with data option and for some reason it makes no difference to the viewer. It still takes it own sweet time to finalize the preview.

What I did and seems to working relatively faster lright was to pass the report a minimum size dataset to each table in the report and get a thumnail preview about the report.

And yes, we do load a dummy report in the background when the applicaiton starts to load the Crystal libraries into the memory. Actually, did it around the same we switched to RAS API some 3 years back.

Edited by: Syed Faisal on Nov 6, 2010 2:17 PM

Answers (0)