This is a migrated thread and some comments may be shown as answers.

Generating output without showing error text

2 Answers 132 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Janitha
Top achievements
Rank 1
Janitha asked on 26 Nov 2018, 03:58 AM

Hi,

We are generating a report using a console application using SDK. As the data source, we are using CSV files. Sometimes these fields give out errors due to various reasons (not properly formatted, null value etc..) When errors occurred the output pdf file contains these errors around a red box giving more error details.

Is there a way to not showing this red error message box because most of the fields are not important, so not showing them if there is an error is ok for us. Can off these error messages in output pdf done using the SDK?

Thank you

2 Answers, 1 is accepted

Sort by
0
Janitha
Top achievements
Rank 1
answered on 26 Nov 2018, 08:08 AM
Using ErrorEventHandler Delegate from the report I am able to catch those errors. But after catching them is there a way to ignore them to achieve above task? 
0
Silviya
Telerik team
answered on 26 Nov 2018, 03:52 PM
Hi Janitha,

The exceptions raised in the reports are generated during report processing, hence they cannot be changed run time. They should either be handled before processing, or the report should be manually cancelled.

If you choose the first approach, I would suggest to create a user function that verifies if valid items values exists, or returns NULL value otherwise. Check the User Functions article for more information.
Additionally, if you are using the Standalone Report Designer, please consider reviewing the Extending the report designer article on how to register custom functions in order to use them later. The user function could be used as a Value for the report items. This way you would avoid the error message when there is no valid value.

If you choose the second approach, I could suggest to check the 
Error handling in Reports and Report Viewers KB article for more information.

Regards,
Silviya
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Janitha
Top achievements
Rank 1
Answers by
Janitha
Top achievements
Rank 1
Silviya
Telerik team
Share this question
or