Conditions based on values of detailed table

Hi,

We are trying to create a dynamic table which would only display records when one of the fields meets a condition and create a new page when the value is changed.

Basically for each member we have a list of transactions and they can belong to 3 different accounts types.
We want to print all transactions for each account type on a new page.

Any help would be kindly appreciated

Thank you.

Hello Darek,

This would become much simpler if you had 3 detail tables each containing only the lines relevant to those account types. It will be easier to separate this using 3 loops in the DataMapper module, rather than attempting to filter the data in Designer (which, while possible, will require scripting that would slow down the output generation).

How the filtering is done in DataMapper will depend on the data source type. The easiest is XML where you can simply use an XPATH expression in the Repeat step to loop on your transaction nodes depending on the value of a property or a child node. For PDF, Text or CSV you’ll need to loop on all the lines using a condition, then use the Goto step to go back to he first line, loop again with a different condition, and repeat for the last account type.

You mention “when the value has changed”, this becomes a little simpler if your account types are already ordered. Instead of looping with “until no more elements”, you could create 3 subsequent loops that are based on a “Do until” repeat type that checks when the value changed. A little more complex, but more efficient.

Once you have your data model with 3 different detail tables, you can simply create 3 dynamic tables, one for each. To force anything to use a new page, go in the properties of the element you want to appear first (either the table or, say, a header or paragraph). In its properties, you can set a forced page break: Formats tab, Breaks group, Before: always.

If you need further indications, I suggest you open a support ticket, in order for them to check your data source and guide you in the right direction.

Hope this helps!
~Evie

Hi Evie,

Thank you for your answer, this was very helpful we were trying to do it that way but started to look for other soultion to do it because of some problems with the datamapper (which are already solved). So at the moment we are extracting 3 difrferent detailed tables and than display each of them on a separate print section using a control script to determine if they are empty or not. This is working perfect for us, and we almost got what we needed.

The last problem we have is that we are displaying the account type above the table but if the table breaks to 2 or more pages this element disappears. So the question is how to make an element of a print section to be also visible on continuation pages?

Thank you in advance.

Darek

Hello again Darek,

There’s 2 ways to display data on a page “between” the dynamic table page breaks.

The first one is to add this to the header (“transport line” and “subtotals footer”), which will appear within the table itself (with some styling magic it could look like it’s not, but it would always be right before or after a table, not anywhere else).

The second is to use master pages. Simply add the account type to the master page and it will always appear in a header or footer depending where you want to place it. It would always be in a static position, but would definitely appear on every page (or on different sheet positions if you decide to go that route and have more than one master page).

Hope this helps!
~Evie