Print Page | Close Window

Limit Record to Display

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=2609
Printed Date: 02 May 2024 at 7:13pm


Topic: Limit Record to Display
Posted By: willsongh
Subject: Limit Record to Display
Date Posted: 13 Mar 2008 at 6:41pm
Hi all.
I am trying to limit detail to display 10 rows in my report. But if the data is less than 0, say only 5 row with data, the rest of 5 rows should display in blank row(grid).
If more than 10 row data in record set, 17 for example, then first page diplay 10, and next page display 7, and 3 are blank rows. I tried in every way, but still have not figure out how to accomplish.
 
I am using CR 8.5. But I think version does not matter.
 
 
Any help would be very much appreciated!
 
 


-------------
Thanks,
Bill



Replies:
Posted By: MaddMatt
Date Posted: 14 Mar 2008 at 6:32am
Hi,
 
Assuming that your displayed data is in the Detail section, set up a Running Total field that Counts any one of your data fields.  For the sake of this example, let call it RecCount.
 
Then, in the Section Expert for the Detail Section, click the x+2 button next to the 'New Page After' option and use the formula :
 
{#RecCount}/10 = int({#RecCount}/10)
 
If your records per page requirement changes, you can change the 10 in the formula to any number you wish.
 
Hope this helps,
 
Matt
 
PS I use version XI, and have long forgotten the ins and outs of 8.5, so I can't be certain that all of the above options are available.


-------------
There are 10 types of people. Those that understand binary, and those that don't.


Posted By: willsongh
Date Posted: 14 Mar 2008 at 8:26am
Hi Matt, thanks for your reply. I can make the record paging part working but it is add blank row grid accordingly troubles me. I tried adding Page footer or group footer to add but not successful.
 
For intance. If I have 6 record of the page, I should display 4 blank rows. If I have 21 row, then the 3rd page should display 9 blank rows.
 
Appreciate your help.


-------------
Thanks,
Bill


Posted By: MaddMatt
Date Posted: 14 Mar 2008 at 9:02am
Hi Bill,
 
The way I think I'd approach that is to create 9 Report Footers, each with one line of your grid.
 
I'd then create a formula to work out how many extra rows you'd need :
10 - ((count({anyfield})/10) - (int(count({anyfield})/10) * 10)
 
and then individually conditionally suppress the Report Footers based on the result.
 
Hope that makes sense.
 
Regards,
 
Matt


-------------
There are 10 types of people. Those that understand binary, and those that don't.


Posted By: willsongh
Date Posted: 14 Mar 2008 at 10:02am
Thanks again Matt.
I used group footer instead of the report footer. Because I have content on page footer. And it is working. Appreciate your help very much.


-------------
Thanks,
Bill


Posted By: omprakash
Date Posted: 04 Apr 2009 at 12:26am
HI ,

i have the same problem as bill.with reference to the post.

Requirement is..
For intance. If I have 6 record of the page, I should display 4 blank rows. If I have 21 row, then the 3rd page should display 9 blank rows.

how is it possible pls help me..

Thanks & Regards,
OmPrakash.


Posted By: themessenger
Date Posted: 07 Apr 2009 at 3:03am
Hi,

I can think of a way of cheating on this one. As part of the page header - draw the 10 lines of boxes using lines. When you build your detail line (or crosstab) just make sure the lines match up.

This way you will always have ten lines on a page irrespective of how many have data in them.

Hope this helps,

TM

-------------
Managing Director
www.allmymenus.com



Print Page | Close Window