[NOTE: I am using Jasper Server 7.9.0, For Report Designing using TIBCO Jaspersoft Studio Professional (TIB_js-jss_7.9.0)].
I have created a Standard Report which displays the report by filtering data within a selected period range. where the two Input Parameters are StartDate and EndDate. Here the problem is calendar is showing Future Dates too which I want to Restrict/Disable.
For the following criteria I want to Restrict/Disable the Dates in Calendar.
1. The Max Date that the user can select is Current Date. All the dates greater than Current Date should be Restricted/Disabled.
2. If User select StartDate as May 5th 2023. when he wants to select EndDate then the Dates Before May 5th 2023 should be Restricted/Disabled.
3. If User selects StartDate greater the EndDate have to show Error Message.
If Restriction/Disabling is not possible, Can we validate the input control to pop up an Error Immediately. If we can please let me know the procedure in Detail.
Thanks in Advance for all the Advices and Answers.
I think there is no out of the box solution to validate/restrict the Future dates.
However, you might be able to add the validations on a custom jsp and import the same to Controls & Resources tab.
But please note that this will work only in the report input controls and not on the scheduler page.
I would like to appreciate to your answer, As you mentioned I had created a JSP file with my custom date validation and tested the code in Non-jasper Environment and it passed all the check points as required. then I have placed the JSP file in the following directory (WEB-INF/jsp/modules/inputControls ) and placed the directory path in Optional JSP Location then restarted the JasperServer and tried to run the report.
Now I am getting the following error. I have attached the Error log file below.
Kindly assist to fix the following error. Thanks in Advance for all the Advices and Answers.
Error Message after running the report
|Error getting after running the report.||16.43 KB|