We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

possibility to stop report rendering

Hi,is there a way to stop the report rendering in the custom code when a parameter validation fails?I tried using Err.Raise(6, Report) but this results in an error.If I just use Err.Raise(6) then no error is thrown but there is also no action from this line of code.Thanks. Regards, Patrick

1 Reply

VS Vinoth Srinivasan Syncfusion Team May 19, 2017 06:21 AM

Hi Patrick, 
 
Thanks for contacting Syncfusion Support. 
 
Currently, we don’t having a support for stop the report rendering based on the parameter validation using custom code. However, we can achieve this by using “Visibility” of report items. To achieve this follow the below steps. 
 
1) add a textbox to the report that is visible only if validation fails.  This text box you can use to display an error message to the user. 
2) put the rest of your report in a rectangle and set it to be hidden if there is a parameter validation error. So the report will not render in report viewer if there is validation error. 
 
We have prepared a sample report based on this and it can be downloaded from the following location. 
 
Regards, 
Vinoth S. 


Loader.
Live Chat Icon For mobile
Up arrow icon