Jump to content
Changes to the Jaspersoft community edition download ×

Dynamic query and grouping

2005 IR Help

Recommended Posts

By: Lalibela - lalibela

Dynamic query and grouping

2004-11-26 04:07

I want to design somehow generic report. Say a report for sales that comprise criterias such as age,sex,education, marital status, sale range ... all these fields will be choosen by the user. Some of the fields might be left empty/not choosen. Can I construct such kind of report by using group by in my query and design a single report template that will work with this...



I really thank you for your responses.








By: Tim Martens - victim04

RE: Dynamic query and grouping

2004-12-12 10:40


I would create my dynamic SQL statement in a servlet, based on the request parameters passed from the jsp.


Then, pass the SQL statement into your JR and use that to create the datasource for your report. Any null fields can be omitted in JR, so you shouldn't have a problem with that.


I do the same kind of thing by passing date ranges for my reports into JR to append to my "where" clause.




Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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...