cancel
Showing results for 
Search instead for 
Did you mean: 

Limiting the amount of records or pages that gets generated by a report

Former Member
0 Kudos

Post Author: jjurroz

CA Forum: General

Hey guys,I'm using CR 8.5.3I have a quick question that hopefully one of your can help me out with. I have a report that works perfectly and uses a couple different parameters for sorting etc.. I'm using an SQL database and for a particular report, after inputting the correct parameter values the report would generate for example 12,000 records on 2000 pages. What I'm trying to do is create a new parameter that would limit either the amount of pages that gets generated or the amount of records. I think I'd rather limit the amount of records to start off with and I would like it to be from a list of predefined amounts. I.E. "ALL", "First 10", "First 50". Essentially I'm trying to create a report that gives me a subset or sample of the main report so that it could get printed to pdf and sent to customer for review. Any help would be greatly appreciated! Regards,Jose

Accepted Solutions (0)

Answers (9)

Answers (9)

Former Member
0 Kudos

Post Author: jjurroz

CA Forum: General

I think it will work but I need to play around with it some more as I'm not getting exactly what I want but it is limiting the amount of records/pages that get generated. I have many groups and I'm probably placing the formula's into the wrong groups. I will report back shortly. -Jose

Former Member
0 Kudos

Post Author: SKodidine

CA Forum: General

If your report has a group then what you can do is limit the number of records displayed based on a parameter.

Limiting the Number of Records in a Group

In that KBase article replace {@formula2} > 3

with {?Parameter} <> 'all' and {@formula2} > tonumber({?Parameter});

Former Member
0 Kudos

Post Author: V361

CA Forum: General

Not that I am aware of.... There does not seem to be any printer control (Outside of a VB interface) even in XI

Former Member
0 Kudos

Post Author: jjurroz

CA Forum: General

how about being able to stop the report from continuing to print once it reaches a certain recordnumber. For instance: whileprintingrecords;IF RecordNumber = 50 then <stop printing> is that possible?

Former Member
0 Kudos

Post Author: jjurroz

CA Forum: General

I can only go to 'TopN/Sort Group Expert' menu option if I add a summary field, otherwise the option is greyed out. If I do add a summary field and go to 'TopN/Sort Group Expert' I have no formula button. I can select TopN from a drop down but then I have to hard code the N value. I'm start to wonder whether its even possible to do it dynamically in CR 8.5. V361:Sorry JJurroz, Here again I have CR XI, so not sure if 8 will do this. Create a number parameter {? Top_N} then go to Group Sort Expert, you should be able to click on the formula button for Top N and put your parameter {? Top_N} in the formula.

That should work.

Former Member
0 Kudos

Post Author: V361

CA Forum: General

Sorry JJurroz, Here again I have CR XI, so not sure if 8 will do this. Create a number parameter {? Top_N} then go to Group Sort Expert, you should be able to click on the formula button for Top N and put your parameter {? Top_N} in the formula.

That should work.

Former Member
0 Kudos

Post Author: jjurroz

CA Forum: General

OK, sorry, I guess I did not understand your statement fully (I'm not an expert in crystal by any means). I figured out how to do the TopN and I suppose its working but the value N is hardcoded. How can I parameterize the value of N?

Former Member
0 Kudos

Post Author: jjurroz

CA Forum: General

you mean like Select Top 50... in the query? My first thoughts was around this idea but then I couldn't come up with a way to affect the query in conjunction with a parameter to inject a 'Top 50' into the sql query. Can you elaborate?

Former Member
0 Kudos

Post Author: V361

CA Forum: General

I don't have CR 8, could you try a Top N, or bottom N ??