Crystal Rep XI- specifying maximum # of records returned

Is there a way to specify the maximum # of records to be returned when the report is queried in Crystal Reports. It can be done for WebI reports by putting a limit (on the universe-level). But is something similar achievable in Crystal reports by any way/ at any level, possibly even thru’ Crystal APIs??

We have a huge crystal report that return millions of records on a normal query. But we want to limit the user from loading up the system. Can we limit the # of records that the user can see from the reports??

Any ideas would be appreciated!

~Cheers~


sdeshpan :us: (BOB member since 2005-06-28)

Is this Crystal Reports XI, or shall I move this to the Legacy Crystal forum?


Nick Daniels :uk: (BOB member since 2002-08-15)

For development purposes, you can restrict your query to a limited record set. For example, if you are looking at “orders by customers,” then maybe you would want to limit that to only the customers whose last name begins with “Z”. Then, after development is complete, you can remove the filter, and put the report into production.


Timmy Wong :us: (BOB member since 2005-03-29)

Thanks for the responses!

@Nick - This is for Crystal Reports XI…so correct forum :wink:

@Timmy - The issue we are facing is that the reports are really humongous. The user queries usually return a milliom rows. But we don’t want the users to bog down the BO Server with such large data, so we want to restrict the response to a specified level. Is there are way to do it? Does Crystal API have anything thru’ which we can specify the limit on the records returned as a parameter? Or even something at the report level? :confused:
It is not a development issue, we even want the prod. to be like this!!

~Cheers~


sdeshpan :us: (BOB member since 2005-06-28)

I think it doesn’t make sense to just return a limited number of rows, based on row count (e.g. SELECT * FROM myTable LIMIT 100). I think it would make more sense to return a subset of rows (e.g. SELECT * FROM myTable WHERE Dept = ‘abc’). I would recommend that you have a parameter for each non-numeric field.


Timmy Wong :us: (BOB member since 2005-03-29)

I agree with Timmy Wong (and I think most others would too).

Having a set number of records will lead to incorrect results due to not enough rows being returned in some queries. You really must restrict the data based on the user requirements, e.g. maybe have only current month, a region, etc.


webiworx :uk: (BOB member since 2005-02-21)

Thanks guys. But we have changed the approach now. Instead of enforcing this count limit on the report side, we will ask the users to keep changing their prompt parameters until the # of records to be returned (using a Stored Procedure) reaches down to the max. value we specify. Only then the user will be allowed to view the report.

I know this might not make too much sense, but this is how the client wants it!!! But there’s another issue with this now. Kindly see:
Calling a prompted Crystal Report 11 from JSP??? and try to help me out with any suggestions.

~cheers~


sdeshpan :us: (BOB member since 2005-06-28)