Jasper Reports: Make optional parts of reports

Hi everybody,

I would like to know if it’s possible and how you make parts of a report which can be set as visible or not.
In fact, I would to provide the user of my Servoy solution, with the choice of having the data he wants. Like the list of the orders with the list of the deliveries, or the list of deliveries with the list of companies and the list of products sold. etc…
The user will have the choice to tick the lists he wants to be included into the report.

I was thinking to make a big report with all the lists and showing them or not depending on the user’s choice but I don’t know if it possible to implement.

Have a look at subreports. You can enter an expression that allows you to print a certain subreport based on some criteria.

Thx. I’ll have a look :D

I’ve also found the option “Print When Expression” for fields. Apparently, if the expression selected returns true it should print the field otherwise no.

By the way I have a new question. I’m trying to use several queries for the same report. I’ve created several datasets for that. I’ve put the fields of the datasets into my report.
But when I try to compile it, the fields are not found. It seems to look for fields into the main “Fields” section.

What do I have to do?