0

I am new to JasperReports Server.

I have a report which is grouped on time interval.

I want to user give the input to group the data in minutes, hours or days. Based on the user input, report must group the records accordingly.

I am not able to figure out the way. Please help.

Alex K
  • 22,315
  • 19
  • 108
  • 236
Prashant
  • 152
  • 1
  • 16

1 Answers1

0

Create a input control "p_days" and add this line in select statement of your query

 SELECT days,hours,minutes,
 if($P{p_days} is null, days, hours) p_groupby
 FROM table_name
 GROUP BY p_groupby
 ORDER BY p_groupby

but this will work for only days and hours.

Sharad
  • 3,562
  • 6
  • 37
  • 59