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

Report Conversion

edited September 2002 in General
Hello, Ive posted messages before on this subject but got sidetracked with
other things so once again....

At the moment we are currently converting our software from Paradox tables
to Advantage.
We currently have a large number of customers using the report builder and
they have existing reports saved in the rbitem and rbfolder tables.

I would like to convert these reports to advantage (as they still look at
the old paradox alias) in and automated fasion, without having to save each
report in turn to file, then parsing the text then saving it back into the
tables.

If this is not possible can I automate the open, save to file, parse the RTM
file , and save as without opening each report manually. Or do you have
any good suggestions

Kindest regards and thankyou

Antony

Comments

  • edited September 2002
    You have to edit the templates. Create a template which connects to the
    advantage database. Save it in ascii format. Report.Template.Format
    property. Compare this to the paradox template's database settings. You'll
    have to write a parser that changes these in the old templates to the new
    ones in order to connect to Advantage. Here is a demo which shows how to
    load a binary template as ascii without having to load it into a report
    object, whcih would require streaming the objects up into existence
    unnecessarily creating overhead when all you want to do is change the
    template and save it down.

    http://www.digital-metaphors.com/tips/ConvertBinaryTemplateToASCII.zip


    Cheers,

    Jim Bennett
    Digital Metaphors

  • edited September 2002
    The problem being the reports are not all saved as files allready but are
    saved in the rbitem.db table with the field template containing text such as

    RB Item Table - Field Template ------

    TPF0 TppReport ppReport1AutoStopDataPipeline plCon_MchPassSetting
    psTwoPassPrinterSetup.BinNameDefaultPrinterSetup.DocumentNameReportPr
    interSetup.PaperNameA4 210 x 297
    mmPrinterSetup.PrinterNameDefaultPrinterSetup.mmMarginBottom?PrinterS
    etup.mmMarginLeft?PrinterSetup.mmMarginRight?PrinterSetup.mmMarginTop
    ?PrinterSetup.mmPaperHeight?^


    The conversion is fine with files allready in the rtm format - But how can
    I make this work for reports stored within a table ?

    Thankyou for your help


    Antony






  • edited September 2002
    Hi Antony,

    instead of loading from file you can load the templates from the BLOB field. See 'Delphi.hlp' topic 'TBlobField.SaveToStream'.

    HTH,
    Chris Ueberall;
This discussion has been closed.