user3239364 user3239364 - 1 year ago 48
SQL Question

How do I get 1 year data in Jaspersoft SQL query

I am using

$(end_date )
as parameters and they have a default value to show last months start and end date.

I want to subtract 1 year from the start and the end date by using a SQL query and not directly in report?

Answer Source

in your SQL query (from Design view, click the DataSet and Query editor icon) :

 ... date_sub($(Start_Date), interval 1 year)... ,
 ...date_sub($(end_date ), interval 1 year)... 
from ...