Issue in getting the previous Quarter dates in Jaspersoft report

0

Hi All,

I have a requirement of creating Jasper report which shows the data for the previous quarter.I have created the report but not able to give the condition for the previous quarter dates in the Japser Report sql.

I have given the below query in the where condition for retrieving the data for the previous quarter startdate and previous quarter end date but it is working in MYSQL but not working in Japser report sql.

Previous Quarter End Date :-TIMESTAMPADD(Quarter, TIMESTAMPDIFF(Quarter,'1900-01-01 00:00:00.000',utc_timestamp()) -1 ,'1900-01-01 00:00:00.000')

Previous Quarter Start Date :-TIMESTAMPADD(day,-1,TIMESTAMPADD(quarter, TIMESTAMPDIFF(quarter,'1900-01-01 00:00:00.000',utc_timestamp()),'1900-01-01 00:00:00.000')); 

Can you please let me know the condition for getting the previous quarter start and end dates in the Japser report sql.

Thanks ,

Surya.
 

surya.subodh's picture
Joined: Jul 5 2019 - 2:52am
Last seen: 2 weeks 4 days ago

1 Answer:

0

There is no "Japser Report sql". When using a SQL data source in JasperReports/Studio, you are using the native SQL of the underlying database.

If you have an expression that works in MySQL, then it will work when you use that expression in JasperReports.

How are these end of quarter calculated dataes wrong?

 

swood_1's picture
420
Joined: Nov 15 2012 - 10:47am
Last seen: 11 hours 38 min ago
Feedback
randomness