Need Help on showing custom error message in BIRT report [message #1246034] |
Fri, 14 February 2014 11:25  |
Eclipse User |
|
|
|
Hi,
I have a BIRT report (.rptdesign file) with "Begin Date" and "End Date" as input parameter. I want to restrict the user to view only 1 month data. I have used the following code in the "validate" script of end_date input parameter.
if(DateTimeSpan.months(params["begin_date"],params["end_date"]) == 0){
true;
}else{
false;
}
This works but it does not tell user that he is allowed to view only 1 month data.
Instead it showing this message "org.eclipse.birt.report.service.api.ReportServiceException: The validation for parameter "end_date" fails.".Also the exception stack trace is shown to the user.
Whereas I want to show a custom error message to the user in the else block. The custom error message that I want to show is "Max allowed duration for the report is 1 month only".
If anyone could kindly tell me if at all it is feasible in BIRT or not
OR
otherwise kindly let me know what is the recommended way of showing error messages in BIRT reports?
I need this urgently. Hence will really appreciate any quick help. Thanks.
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04197 seconds