cancel
Showing results for 
Search instead for 
Did you mean: 

Print all records on next page if more than 3 records

Former Member
0 Kudos

Hi Gurus,

 

I have a requirement where I need to print all records from the detail section on page 2 if number of records are more than 3.

 

So, no records (from the detail section) will print on first page if the records are more than 3. How can i achieve this?

 

Please help. Thank you.

Accepted Solutions (1)

Accepted Solutions (1)

abhilash_kumar
Active Contributor
0 Kudos

Hi,

Here's how you can do it:

Go to Section Expert > Report Header > Paging tab > click on the formula button 'New Page After' and use this formula:

count({database_field}) > 3

Hope this helps!

-Abhilash

Former Member
0 Kudos

Hi Abhilash,

Thanks for the prompt reply. Your solution works perfectly, but can you please explain how this is working. I m having a little hard time understanding the logic behind it.

Thank you.

abhilash_kumar
Active Contributor
0 Kudos

Every section except the Page Header has an option called 'New Page After'. If this is enabled it will make sure the section below it prints on a new page.

Since, we need to print the details section on a new page only when the records are greater than 3, we need this selection to be dynamic.

So, the formula first counts the total number of records for the field and dynamically enables that option for the Report Header essentially pushing the next section on a new page.

-Abhilash

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi

Write the following running total and place it in all sections.

Whileprintingrecords;

Numbervar x;

x:=x+1;

It will print serial sumbers in your report, now you go in section expert --paging and click on X-2 (formula editor) and write a formula to insert a new page

Thanks,

Sastry

Former Member
0 Kudos

Hi Sastry,

Thanks for the quick reply. I m sorry, but I was not able to understand your suggested solution.