Generating output without showing error text

3 posts, 0 answers
  1. Janitha
    Janitha avatar
    14 posts
    Member since:
    Mar 2018

    Posted 25 Nov 2018 Link to this post


    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 turning off these error messages in output pdf done using the SDK?

    Thank you

  2. Janitha
    Janitha avatar
    14 posts
    Member since:
    Mar 2018

    Posted 26 Nov 2018 Link to this post

    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? 
  3. Silviya
    Silviya avatar
    424 posts

    Posted 26 Nov 2018 Link to this post

    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.

    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
Back to Top