cancel
Showing results for 
Search instead for 
Did you mean: 

New page at every nth record

Former Member
0 Kudos

Hi Experts,

I have a table for my Print Form. I want a set number of records to appear on each page. Say for instance I want only 5 records per page. How can I achieve this?

Currently I have added an additional field containing the index and then at the row I have a script (formcalc) which has the code like mod(ROW.FIELDID, 5) == 0. This is working but the problem is I do not need the "FIELDID" in my output. I made it invisible but still the border surrounding the table rows is after this field (as this is the last field). This makes my form look awkward. Is there a workaround or a simpler way of achieving this??

Thanks.

Accepted Solutions (0)

Answers (1)

Answers (1)

NoJo
Active Participant
0 Kudos

where do you have your formcalc script placed??

you tried with conditional breaks (pagination Tab)?

Former Member
0 Kudos

I have the following Hierarchy:

Body Page

--Data

-


Table

-


Row

-


FieldList

The Row (above) is where I have added the script. And it is working fine because I have added an additional column into the table structure to contain the row index (which is being populated in the report program).... my question is how can I get the row index without having to add additional column to the table structure.

Thanks,

Abd-Al-Aleem

Former Member
0 Kudos

Hi,

Please check if these help:

1. As you have placed the script and column in invisible mode, the layout will still consider the column as a place holder. Try "hidden" so that the column remains invisible and the column area can be consumed for design in layout.

2. To find the row index, this procedure can work:

As you have assigned your Row/Field to a data source, the binding tab may display the binding as [*] format, meaning more than one rows. See that you uncheck the option of Min 1 rows (which u can locate). This way, the execution will enter the scripting logic/field as many times the number of record. You can write a logic to trigger a new page for every 6th entry in table. Try it, and update back in case you are still facing the issue.

Cheers,

SV

Former Member
0 Kudos

Hi Santosh,

Thanks for your response.

The first option is not possible ... I don't know why, the drop-down allows me to select only 2 options visible or invisible the rest of the options are grayed out.

For the second option, How can I get the row index in the script? Can you suggest some scripting code?

Thanks,

Abd-Al-Aleem

Former Member
0 Kudos

I figured out.

I have used n = 6 in the below javascript

if (this.index != 0) {this.index%6 ==0 }