llaconde Posted January 9, 2008 Share Posted January 9, 2008 Hi everybody, I'm new in ireport. I've bougth the documentation but I don't manage to print a date in my report. I've already manage to print a variable in my report that I have declared in my java class like this:parameters.put("City", "PARIS");and in my report creating a "parameter" called $P{City}.How do I do to do the same with a date?Thank you in advance. LL Link to comment Share on other sites More sharing options...
Kumar_rahul Posted January 10, 2008 Share Posted January 10, 2008 Hi, Why don't you try something like putting the following in your java code:parmeters.put("dateParam", new Date()) In iReport create a parameter of type java.util.Date and name it "dateParam" (note the case). Then create a Text-Field and set its type as java.util.Date. In the Text-field expression editor select the parameter to be displayed (i.e. $P{dateParam}). Hope this helps. Rahul. 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