Print Page | Close Window

Increase number of records per page in report

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=5369
Printed Date: 26 Apr 2024 at 7:31pm


Topic: Increase number of records per page in report
Posted By: Sidewinder2
Subject: Increase number of records per page in report
Date Posted: 29 Jan 2009 at 10:19pm

Hello Mate,

I found the below steps to increase the number of records per page in crystal report. But i don't know where to insert these formulae and how to build these formulae.What is @Reset @Details.

Could U please tell me how to perform these steps in a clear way so that i can understand.I am totally confused!!.

1. Create the @Reset and @Details formulas:

@Reset - this formula goes into the Page Header. It resets the counter to 0 when SCR moves to a new page.

WhilePrintingRecords;
NumberVar counter := 0

// declare a number variable and assigns
// it a value of zero

@Details - this formula goes in the Details section. It counts each record.

WhilePrintingRecords;
NumberVar counter;
counter := counter + 1

//increments the variable by 1 for each record on the page

2. Use the @Details formula to conditionally force a "New Page After". Every time the counter reaches the sixth record, it moves to a new page and prints the next set of six records.


Go to Format | Section, and select the Details section.
Click the "X+2" button beside the "New Page After" option (do NOT check the New Page After box). This opens the Condtional Formatting Formula Editor.
Enter the following condition:
mailto:%7B@Details - {@Details } = 6

 

Thanks,



-------------
Much Obliged & Thanks A Lot,
Sidewinder2



Replies:
Posted By: lockwelle
Date Posted: 30 Jan 2009 at 6:19am
the reset is typically in a group header.  the row counter is typically in the detail section, and since this using new page after, that would in the Section Expert in the group footer for the 'New Page After' line.


Posted By: JohnT
Date Posted: 30 Jan 2009 at 7:30am
Start by creating the @Reset formula. 
 
Go to Field Explorer
Click on Formula Fields
Right Click and select new
Enter the name of your formula - in this case @Reset (or whatever you want to call it)
Click on Use Editor
Enter the lines from your message posting for the @Reset formula.
Save.
Repeat the process for the @Details Formula.
In the design view of your report, drag the @Reset formula from the formula fields to the page heading.
In the design view of your report, drag the @Details formula to the detail line of the report.
In the design view of your report, right click on the detail line and select Section Expert.
Highlight the detail line.
On the right side, click on x-2 for 'New Page After'.
Type in mailto:%7b@@Details%7d=6 - {@@Details}=6   (Yes, you will need the 2 @ signs)  You could also drag the @Details formula and add the =6
Save
 
You will probably have to suppress the @Details formula in your detail line or it will print the numbers and I don't think you want those to print. 
 
This example shows how to decrease the number of lines on a page.  It probably won't work to increase the number of lines because the size of your piece of paper is fixed. 
 
You are finished !  Hope this helps.  Good luck



Print Page | Close Window