Search code examples
javajasper-reportsireportrecord

Grouping data by date in ireport


I made ​​a report as of the date of purchase transactions. I want to display the format as below:

enter image description here

In pictue above the date is only displayed once at the top.

Now, the date shown in each record that appears. enter image description here

I already have the solution using subreport. In my report i select distinct for the date. And subreport using parameter from primary report. But the problem now is, the data in each date is duplicate in every row. enter image description here

How to handle that?


Solution

  • You can use Subreport to do this. Example i will have two sql, the first sql i will call DISTINCT all date and then the second sql (use for subreport) i will get all data have date like date in the first sql (using parameter). (Sorry my English is not good, i can'tardescrip all for you :).)