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

Limit number of days from data


nguyen.m

Recommended Posts

  • 2 weeks later...
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

You can validate the parameter values - so if the range is larger than 90 days, set another param value so that the SQL doesn't execute. i.e.

is. dateParam2-  dateParam1 > 90 days? then setValueToPreventQuery (SELECT 1 WHERE false etc)

Alternatively, you could simply default to 90 if those values are greater than 90, and just display a msg to the user - "your inputs where greater than 90 days apart,, so here's the 90days starting with X". 

What I typically do is render a link for direct file download - prevents so much system churn etc. Sometimes a user might need more than 90 days. If a direct file download isn't feasible, maybe schedule the report for off-peak execution. Many different ways to approach this. 

JasperServer doesn't provide for sophisticated input validation - you can customize but if you're just figuring this much out, I would suggest custom input controls. 

Link to comment
Share on other sites

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...