Counting with variable and a new page
Ronald van Amelsvoort
On a document, i have created variables. These are used to calculate totals.In the advanddataband, I defended a field, witch shows the desired value from the database, and in the generatescipt I add the field value too the variable.
At the end, I show the total of the variable.
As long the block with data is on the same page, the counting is correct. But when I have more data then the designer continuous at the new page. At this moment is goes wrong, The first row printed on the new page , is added twice to the variable
What is wrong?
With Kind regards
Ronald van Amelsvoort
Philipp Knecht
Hi RonaldThis is because GenerateScript can be called twice.
If the engine renders to the bottom of the page and the recognises that space is insufficient it'll go to a new page and call generatescript again.
Use the GetData - Script to ensure 1 time calling.
hth
Ronald van Amelsvoort
Does this mean, using the generate script on a detail band or groupband, instead on the generatescript of a field?Ronald
Philipp Knecht
Hi RonaldYes if you have page breaking texts in your layout then this is the way to solve it.
hth
0
Please sign in to leave a comment.
Comments
0 comments