Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

tables visibility

Avatar

Former Community Member
Hello



i'm new to livecycle and i'm developing an application which fille a pdf with some data retrieved from database.

One of this pdf has to visualize a set of tables. I need to visualize the tables only if they contains rows, otherwise they must be hidden. I'm been able to do this using scripts (i've tried to set the behaviuor from the designer : repeat table, min count ect, but it leaved an empty space if the previuos table were empty). Now the customer whishes each visible table starts on the new page, but setting the property pagination->place to start on new page bring me back to the problem of having the first page with only the header text shown. This happen when the first table is empty but the second is filled.

there is "conditional break " option, which require javascript but don't know what to write inside



thank you in davance

Stefano
2 Replies

Avatar

Former Community Member
are you setting your table to hidden or invisible?



hidden should take that table out all together, and nto leave a white space, while the invisible will only "hide" it, but leave the white space place holder....

Avatar

Former Community Member
they are set to hidden(exclude from layout)by default , i get the row count with javascript and if it's greater than 0 i set the property to visible.



I've placed the script into layout ready event,after adding some messageboxes i've found the count get calculated twice. Anyway my problem was how to force the second table not to go to new page when the first table was empty (so removed from layout). I've resolved putting Place = "following preaviuos" and after="go to new page" for each table,

instead of Place = "go to new page"



thank anyway for your support