patricia.williams Posted September 1, 2015 Share Posted September 1, 2015 My postgres db has a date field and pgadmin query select * from contribution_info where contribution_dt between '2015-01-01' and '2015-12-31'results in a dt field like "2015-06-15" . When I try to preview my studio report i get prompts for StartDate and EndDate and I fill those in with 2015-01-01 and 2015-12-31 respectively. However, I get the java exception then that says net.sf.jasperreports.engine.JRException: java.lang.ClassCastException: java.lang.String cannot be cast to java.util.DateWhat am I doing wrong? Here's the snippet of dataset query that has the date clause and c.contribution_dt between $P{StartDate} and $P{EndDate} Link to comment Share on other sites More sharing options...
patricia.williams Posted September 1, 2015 Author Share Posted September 1, 2015 also I setup StartDate and EndDate as java.sql.date Link to comment Share on other sites More sharing options...
patricia.williams Posted September 1, 2015 Author Share Posted September 1, 2015 here's what the server shows on the where clause when I push it over to the server and run it there from contribution_info c inner join contribution_persent cp on c.contribution_info_id=cp.contribution_info_id inner join persent_info p on cp.persent_info_id=p.persent_info_id inner join persent_address pa on p.persent_info_id=pa.persent_info_id inner join address_info a on pa.address_info_id=a.address_info_id inner join report_info r on c.report_info_id=r.report_info_id where 1=1 and c.contribution_dt between ? and ? and (lower(p.name_last) like 'vandergrif' or lower(p.name_organization) like 'vandergrif') 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