HOW CAN I CATCH THE ERROR WHICH HAPPENS IN RDF VIEWER(WEB SITE)

Posted by: napoleonliu on 4 August 2017, 3:14 pm EST

  • Posted 4 August 2017, 3:14 pm EST

    If i set a  wrong datapath to my rdf viewer object,
    when i preview my rdf file,it will pop up a dialog box,and tell me the error code.
    but my customer didn't want the error code,  because he don't know what's the error code meaning.
    so i want to catch the error  when i open the viewer ,i use the viewer object in my web site?
    if there anyone can tell me how to catch it?
        sorry for my poor english?
  • Replied 4 August 2017, 3:14 pm EST

    Hello,

    Thank you for your post. I would like to inform that you could use the Visual Basic Error Handling (On Error Goto….) to catch the error when there is an error in loading the RDF to the ActiveReports Viewer. Please take a look at the attached sample in this regard. Please remove the “TestRdf.rdf” file from the project folder and observe the customized Error Message.



    Please let us know if there you need further assistance/clarifications.



    Regards,

    Prantik




    2009/04/TrappingErrorCode.zip
  • Replied 4 August 2017, 3:14 pm EST

    Thank you for your help.
    I know the method which you tell me. but  now  i load and preview my rdf file in a web site, so i cann't  catch the error with VB , but i can catch the error with javascript (in error event) but i can't get the error code and i can't stop the error message pop up . so can you tell me how to do this. anyway thank you!
  • Replied 4 August 2017, 3:14 pm EST

    Hello,



    Thank you for your patience on this issue. In order to resolve the issue, I recommend using the FileExists method of JavaScript to first determine whether the RDF exists or not and then load the same to the ActiveReports Viewer control. Please take a look at the attached sample. Please place the rdf file in the c: drive of the system to get the proper display and please remove the same to get the customized error code.



    Regards,

    Prantik


    2009/04/JavaScriptAnd AspPage.zip
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels