aspose file tools*
The moose likes Other Open Source Projects and the fly likes jasper report ireport 3.6.1 passing a parameter for a where clause Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "jasper report ireport 3.6.1 passing a parameter for a where clause" Watch "jasper report ireport 3.6.1 passing a parameter for a where clause" New topic
Author

jasper report ireport 3.6.1 passing a parameter for a where clause

joao coelho
Greenhorn

Joined: Mar 28, 2005
Posts: 11
I created a jasper report to get some data without any where clause and call the report from a java application. Now, i need to add some criteria so that i can get a single report instead of a whole batch.. For example, i want to select a report based on a lastname. I am at a loss as to how to do that.
First, in iReport, if i select the report query, i see my query:

"select namelast, namefirst,namemiddle, FORMATTEDNAME , employeetimebase, employeecbid,workweekgroup,last4ssn,bur, position_number from table order by bur,namelast,namefirst,namemiddle".

Now i want to insert a where clause for the last name for example. In ireports, I see a filter expression that shows a pane with list of fields, parameters and so on. The middle pane for the parameters has a report_parameter_map item. I think i need to use that since my java code uses a call JasperFillManager.fillReport(...) that passes a hashmap. I have searched on the web but nothing has been very helpful to me.
I am not sure how to set up the parameters in the report template using the expression editor. I hope that once i set this up properly then all i will need is to make the call fillreport and pass a proper hashmap and it should work.

Any ideas on how to set up the where clause in the iReports template query with the report_parameters_map? Maybe report_parameters_map is not the proper selection i should be using.

Thank you.


ofilha
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: jasper report ireport 3.6.1 passing a parameter for a where clause