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

Upgrading from BDE to NativeDB (and from RepBuilder 6 to 10) in one shot! :)

edited February 2010 in End User
Ok guys, here is my case...

I had to rebuild an old implementaion of the end-user program... The
original version was compiled with Delphi 5, Report Builder 6 (or 7), and it
was a BDE bases... The new one is on Delphi 2007, RB10 and Native DB as the
data access... so far I have the program in place, and it run perfectly with
it's own report.

The problem start when we try to open a report developed with the old
version... it tries to access the data from a BDE point of view (using
TdaDBEQueryDataVaiew, TppChildBDEPipeline, so on)... I did a small procedure
that replace those components (and remove the OnPageRequest event)... so far
so good! As of now, it does ask for the database connection... and it will
error out... a work around is to load the report on the designer, do a minor
change on the data, and it will save fine!

How can I automate that process? I tried loading into a stream, then into
the template (ppReport1.Template.LoadFromStream(aStream);) and invert the
process with a SaveToStream, and back at the data... with no success...

tks,
Luis

Comments

  • edited February 2010
    "Luis" wrote in message news:4b7c5e90$1@mail....

    I've just done a similar thing for a BDE/Paradox set of reports changing
    them to use UniDAC data access components.

    The only way I found was to programatically load the reports from DB, save
    the reports as text .rtm files, process each one substituting various text
    as required and then load them back into the database.

    Aside from the TdaDBEQueryDataVaiew, TppChildBDEPipeline, etc., I found I
    had to change other things like
    database names >> connections
    table names xxx.DB >> xxx (no .DB ext)

    We also had some reports passing parameters to DB related pass through
    functions but we manually edited those to work under UniDAC once they were
    back in the DB/Report Explorer.

    Identifying the changes required takes the most time, for changing text I
    simply used ReplaceText() with an array of old >> new text mappings and
    tested each line in the rtm (brute force type code, nothing elegant) but it
    only took a minute to run through them all.

    Regards, Paul.





  • edited February 2010
    In addition to Paul's thorough response, it is possible to skip saving the
    templates to file (if they are already on a DB) by using the following
    method...

    http://www.digital-metaphors.com/rbWiki/End-User/Fundamentals/How_To...Edit_Templates_as_Text

    Remember, the best way is to re-create one of your reports over again from
    scratch and compare the changes to the existing one.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited February 2010
    Luis,

    Another article with helpful information about DB conversion.

    http://www.digital-metaphors.com/rbWiki/DADE/Fundamentals/Convert_Template_BDE_to_ADO

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited February 2010
    That actually worked (save to file and reload), however I found that
    stringreplace do the work a bit more smooth... and after a few tries, it
    seems to be working!


    tks!




This discussion has been closed.