Method to show or hide form parts

Hi everyone,

I’m designing a form with subsummaries, and this gets me to thinking: If I want to give my user the choice (through a dialog) to show or hide some of the subsumm parts, while still keeping the same sorting on the records, is there a way to methodically do this without having to create a zillion forms manually, depending on the user’s choice? Something like forms.ultimate_report.part.subsumm_by_date(hide). :?: That would be really cool!

I guess I could achieve the same result by keeping the same sort order, and by duplicating to calc fields the sort fields used, and then using these in my subsummary part definitions, and adjusting my sort order through the method to reflect the user’s choice (which would in essence show or hide the corresponding subsumm parts), but it seems like WAY to much work either way, and I don’t like to put columns in my db’s that are just equal to another column in the same db… :roll:

TIA,

Ben

If you have a subsummary part on a form and do not sort by that break field - it will not show up on the final report.

If your report contains:

Header
Subsummary (Country)
Subsummary (City)
Subsummary (Zip)
Body
Footer

And you sort only by COUNTRY - that’s the only break that will show.

Thanks for the suggestion, Bob. I am aware that modifying the sort order will in fact hide or show the form parts that reference them; however, if I want to show data sorted by, let’s say, date and amount, I would like to not touch the order at all and leave it as is, but rather let the user choose either to group the data using the date as a sub-summary part (different sections for each date) or not (one big section with data sorted on the date first, then on the amount) - in other words, I would like to dynamically determine if a given form part should appear or not, based on a user’s choice, while still using the same form. Is this feasible?

Ben

AH! Ad-hoc grouping. OK, so you can do the above method (and only give them certain combinations to choose from - or just build the HTML report yourself - and let them enter whatever.

Right, but it would still be a lot more flexible if we could choose which parts to hide or show on a form, using a method. Pretty please? :)

Ben