surya.subodh Posted July 25, 2019 Share Posted July 25, 2019 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. Link to comment Share on other sites More sharing options...
swood_1 Posted August 26, 2019 Share Posted August 26, 2019 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? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now