Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Limit in Detail Lines

Status
Not open for further replies.

jorg32

Programmer
Jul 10, 2003
57
0
0
BE
Hi,

Is it possible to let Crystel do showing on each page a maximum of eg. 25 records in the details?

So yes, how to do this.

thanks for helping me.

J
 
Hey there Jorg,

First up, create a formula something like the following and place it, suppressed, in your details section.
Code:
//{@Counter}
WhilePrintingRecords;
NumberVar Counter := Counter + 1
In the section expert, apply a condition on the New Page After area of your Details section like:
Code:
Remainder({@Counter},25) = 0
Naith
 
You'd need a page count, and then set the detail line to begin a new page when the count is more than 25.

Page counts work as follows:
//In the page header, add a formula field with the following.
Code:
WhilePrintingRecords;
NumberVar LineCount :=0;

In the detail setion
Code:
WhilePrintingRecords;
NumberVar LineCount := LineCount + 1;

Right-click on a section and choose Section Expert. Then choose the formula icon (x+2 and a pencil) for New Page After. Check the count.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Actually no variables are needed. Format the detail section, and click on the X-2 button for new page after and enter a formula:

Remainder(RecordNumber,25)=0

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports
 
Of course, you're right dgillz. I clean forgot about RecordNumber.

Wow, it HAS been a long time.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top