cancel
Showing results for 
Search instead for 
Did you mean: 

Restrict the number of Records in a page

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Former Member
0 Kudos

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.

Former Member
0 Kudos

Hi Neo,

After i tried implementing it only, i posted the method here. Can u re-check again whether you have followed all the steps properly. Its working fine for me.

Thanks,

Meena

Former Member
0 Kudos

Hi Meena,

Thank you

You know what ? the problem was Reset was in report header.

Regards,

Neo

Answers (1)

Answers (1)

Former Member
0 Kudos

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.

Former Member
0 Kudos

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.

Former Member
0 Kudos

Hi Meena,

Excellent I am impressed by the logic you applied.

Tahnks a lot you taught me really a good way to archive it .

Happy weekend

Thank you.

Neo.

Former Member
0 Kudos

Hi Meena,

While Applying your formule i'm getting some boolean funcion error. How to resolve this error.

Can you help me in this ?