nguyen.m Posted January 23, 2023 Share Posted January 23, 2023 Hi,Is there a way to limit the number of days from the data? For example, I have put in a start and end date parameter, but I don't want the user to be able to run it if it's more than 90 days. Anything more, it causes the system to slow down. Link to comment Share on other sites More sharing options...
darth_fader Posted February 4, 2023 Share Posted February 4, 2023 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 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