Batch converting old reports

edited September 2017 in General

we succesfully made our update from RB5.56 to 18.0, converting reports
is done on the fly on beeing opened for the first time with the new
version. Reports(>300) are stored as templates in our database.

Customers already working with our software can use the on-the-fly
conversion, but there are 2 situations, where we would like to deliver
converted reports:

1.) On new installations the reports should already have been converted
on deliviering them
2.) Customers doing a restore from our delivered templates should get
converted ones.

My idea was to do a bulk-conversion, i.e. opening each report, firing
conversion, and save them back to our database.

On my first run this worked fine, upto our specialists on reports tried
some more and found missing datapipelines on lots of them.

After debugging i found out, that obviously all forms containing a
datapipeline being refereced from any reports have to be created.
As there are lots of forms containing reports there is no guarantee to
find them.

Is there a way to do the conversion without having to open all forms?

I hope so, as I am just thinking, what will happen if there is a
neccessary conversion from RB18 to RB19.....


Hint: We altered the sources!Hint: We altered the sources!


  • edited September 2017
    Hi Carsten,

    The recommended architecture is to use the Data workspace to build the
    queries so they are saved as part of the report definition. This
    architecture solves that issue plus many others that can arise.

    When using external datapipelines residing on forms/datamodules, then you
    need to create the form instance and load the report so the datapipeline
    reference can be resolved.

    1. One option might be to modify the template as text, rather than loading
    it into a report. Load the template into a TStringList and modify it that
    way. There is a downloadable example at the bottom of this rbWiki article.

    2. How does the application know which reports can be loaded by each form?
    Is that info stored somewhere, you can use it write a conversion program
    that creates the required datapipelines prior to loading the report. If that
    info is not stored anywhere, write a Delphi program to iterate over all of
    your .pas files and build a list of datapipeline names and then create
    datapipelines with those names, sort of a special conversion form that
    contains every datapipeline that can be referenced.

    Best regards,

    Nard Moseley
    Digital Metaphors

    Best regards,

    Nard Moseley
    Digital Metaphors
  • edited September 2017
    Hi Nard,

    basically there is one form where most of the datapiplines are stored
    but unfortunately there are some other forms with datepipelines,

    I hoped not to have to iterate over my source code in order to find all
    pipelines and to instantiate them on converting

    Which changes are made to a report when converting from 5.56 to 18.0 ?
    Will there be more conversions on upgrading from 18.0 to 19.0 in

    Tia Carsten

    Nach längere Bedenkzeit hat Nard Moseley (Digital Metaphors)
This discussion has been closed.