Home Devices
New Blog Posts: Merging Reports - Part 1 and Part 2

How to Supress Report Error Dialog

edited February 2007 in Devices
I recently upgraded from RB 7.04 to RB 10.05.

I was using the RBAddon components which are not supported (or needed) in RB
10 so any report that contains an RBAddon comp will pop up an error dialog
if I try to open it.

I created a small program that will attempt to open each report using
try..except and log any reports that contain errors so that I can convert
the reports manually at a later date.

My problem is that whenever an error is found the 'Error Reading Report'
dialog pops up and I have to manually select 'Cancel' to continue
processing.

Is there a way to suppress this dialog (or at least respond from within the
program)?

Thank you for any help you can provide in this matter.

Gary Colclough

Comments

  • edited February 2007

    - only way to do that would be to modify the source code to ppTemplat.pas,
    the method TppTemplate.LoadFromStream initializes FIgnoreErrors to False,
    you could change that to True.

    - the other approach is to write some conversion code that reads the report
    templates as a stream, converts the binary stream to ascii text and then
    modifies the ascii text.

    Here is an example that shows how to read the report s from the Report
    Explorer database and convert each one to ascii text so that it can be
    edited.

    www.digital-metaphors.com/tips/EditTemplatesAsText.zip


    --
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.