Jump to content
We've recently updated our Privacy Statement, available here ×

Relative Dates - Parameter MONTH, YEAR


samhast

Recommended Posts

new net.sf.jasperreports.types.date.DateRangeBuilder("MONTH-1").toDateRange()

Can I insert a parameter instead of a hardcoded MONTH -1?

I tried with a string parameter:

new net.sf.jasperreports.types.date.DateRangeBuilder($P{parameter1}).toDateRange()

But that doesn't work..

 

Link to comment
Share on other sites

  • Replies 6
  • Created
  • Last Reply

Top Posters In This Topic

To open it in iReport unzip the file and go to /resources/public/sandbox/Demos/DateDemo_files, and rename the file DateDemo_jrxml.data to DateDemo.jrxml, you will be able to open that report in iReport. I sent you the full jasperserver export because I also created the input controls for that report so it will be better if you import that to your jasperserver and then open the report from iReport connected to your server.
Link to comment
Share on other sites

  • 2 years later...
  • 2 weeks later...
Thanks! This helped me too. Just what I was looking for. I wish, on the Jasper Server, it had the option to switch between the Relative Date and Calendar views (as in Ad Hoc reports). I can enter either a date or relative date to the field and either work. But, it's not intuitive to the user that they have both options.
Link to comment
Share on other sites

  • 7 months later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...