Jump to content
Changes to the Jaspersoft community edition download ×

Dynamic Report Generation in JASPER


aptare

Recommended Posts

Hi All,

 

I have an applicaiton which is a wizard and at the end of the wizard, a PDF needs to be generated based on the user input. So if based on certain user entered values, a section is not visible, the section should not be visible on the generated pdf as well.

 

Also there are cases, where if the user selected "Yes" as option, the user has to enter few extra fields. So the generated PDF also needs to abide by that.

 

My question are following

1. What should be my aproach when designing such a report. I am using iReport as my report designer. Is it even possible to do this? I tried using printWhileExpression, but that causes empty space.

 

2. Another solution is to put the logic in Java code where even the labels are coming from the data source (lets say a map). The downside to this approach is that in case I have to do some style sheet changes or label changes, I have a dependancy in terms of java code.

 

Please suggest what I should do in this scenario. I am sure this is a very common requirement.

 

Would FOP be any better to solve this particular problem?

 

Thanks in anticipation,

amit

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

You can certainly do this....the parameters selected in the UI should be passed into the report as parameters and use these in PrintWhen expression portion to drive the display of the data....at the same time select remove line when blank option for the fields that need to be removed.....hope this helps!!!
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...