on 04-03-2009 11:48 AM
Hi All,
I would like to know how to restrict the number of records that should appear per page in a report in other words how to implement "pagination" in CrystalXI ?
Thanks in Advance!
Meena
Hi Meenakshi,
This can be done based on your repot, if you design a plain report without groups then write this formula:
WhilePrintingRecords;
Numbervar x;
x:=x+1;
Place this formula in detail section and go in Section Expart select detail --select New page after then give this formula:
Numbervar x;
If x>= 25 then true
Write one more formula and place this in your page header:
WhilePrintingRecords;
Numbervar x:=0;
This will print only 25 details lines in each of your pages.
Thanks,
Sastry
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sastry & Meena,
The above things I Tried but the result is something different.
As followed meena's way it will disyplay 7 recodes at the first page.
and then from second page all the page will be displayed without record selection. I mean not 7 records after first page.
If I follow sastry's way it will disyplay 7 at first page and after only one record per page.
It means still something has to be implemented.
Regards,
Neo.
Hi,
This is an awesome question please let me know if you get the answer.
we have page break, new page after ,keep together etc....
It is something totally new for me.
Regards,
Neo.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Neo,
I have found a way to implement this:
1. You need to create two new formulas u2013 Count and Reset
2. Reset -> This formula will reset the counter variable at the beginning of each page/new page. This should be placed in page header of the report
WhilePrintingRecords;
NumberVar counter:=0
3. Count -> This formula will count the number of records placed in the details section. Place it in the detail section of the report
WhilePrintingRecords;
NumberVar counter;
counter:=counter+1
4. Go the the section expert and select the X+2 button to the right of u201CNew Page Afteru201D option. In the formula editor that appears, enter the following formula,
{@CountDetails}=7 (number of records you want to display per page
5. This condition will force a new page when Crystal reaches the seventh record in the details section. The count will reset to zero at the beginning of each page due to the @Reset formula
6. To hide the formula fields in the header and details section, right click on the field and go to format font. Change the color to white and you will not be able to see them.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.