mhbashar1 Posted January 1, 2008 Share Posted January 1, 2008 I have the following query in my master report- SELECT purchase_item,purchase_dateFROM purchaseWhere MONTH(purchase_date)=$P{month} AND YEAR(purchase_date)=$P{year} where $P{month}and $P{year} is parameter for month and year respectively.Now how should I provide this month and year from my java application with Map collection.Can I do the following-Code:static HashMap <String,String> map=new HashMap<String,String>();map.put("month",12);map.put("year",2008);JasperFillManager.fillReport(reportFile, map, jdbcConnection); Link to comment Share on other sites More sharing options...
andysusanto Posted January 2, 2008 Share Posted January 2, 2008 hai, yes you can do it just make sure the you already define the name of paremeter that you want. if you want to check your parameter click View menu than see the Parameter Regards, Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now