Working Jasper Report with Date Parameter & Exported to PDF

Hi Guys,

I Just want to share some report parameters & export to pdf on Jasper Reporting using CUBA :slight_smile:

  1. Create Date Parameters on iReport Designer.

  2. Add the Date Parameters on Report Query.

  3. Compile the Report to .jasper.

  4. Create Middleware Service Bean for Report as Service & Add the Report Parameters.

  5. Create Interface for Report Service.

  6. On Report Button Click Method call the Report Service & Pass it as Window Parameter.

  7. On Report Screen get the report output then use it as source for the browserFrame.

Good Luck Guys :slight_smile:


Great help, thanks for your time !

that was very very helpful, i just have a small update, you can dynamically retrieve the parameters from the report JRXML -i have done it before on another non-cuba based application-, will share the code after i actually do it on CUBA.


Hi @Earl02
Where did you put the jasper files when you deployed the application and did you use any path variable instead of hard-code path?

Please check number 4 picture above check for the string filename :slight_smile: Its being hard coded. You can also use path variable too but on this example i just use hard code.

Want to shed some code snippets on using path variable?

If your using Windows Server you can create system environment variables & use the variable name as its path. Like %temp%, %SystemRoot%.

Also you can use file storage :slight_smile: