kc5qoc Posted April 13, 2007 Share Posted April 13, 2007 I would like to add the datatype java.sql.Timestamp to the list of available datatypes available for input controls. I need this in order for my reports to function within JasperServer 1.2.1 I understand that there are Date and DateTime datatypes and have used them in the past. The problem is that Oracle needs the java.sql.Timestamp. When I define a parameter using this type and publish the report in JasperServer with an input control of type Date or DateTime I get an error from JasperServer saying the data submitted is type java.util.Date which is NOT java.sql.Timestamp. (It works fine in iReport because it understands java.sql.Timestamp) Is there a process defined to add a datatype to the repository so that is becomes available to the input controls ? Link to comment Share on other sites More sharing options...
teodord Posted April 18, 2007 Share Posted April 18, 2007 Hi, You can post this as a feature request here:http://jasperforge.org/sf/tracker/do/listArtifacts/projects.jasperintelligence/tracker.feature_requests Thank you,Teodor Link to comment Share on other sites More sharing options...
tinnyb Posted May 28, 2007 Share Posted May 28, 2007 I have a workaround for this. I've added a prompting parameter accepting java.util.Date (let's call it paramDate), and then I have a second non-prompting parameter of java.sql.Timestamp (let's call it paramTS). paramTS has as its default expression: new java.sql.Timestamp($P{paramDate}.getTime()) The paramTS is the one used I plug in to the query. I'm using Postgres with timestamp fields and so I needed to get a prompted date from the user into the query and this works fine for me. Hope this helps your situation. 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