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

Converting reports from one plugin to another

edited July 2004 in General
I am in the process of creating a new plugin for Core Lab's SDAC
components. I have several existing reports that were used with the
BDE. When I open the existing reports and go to the data settings
dialog from the data tab in the designer, I see that it is set to BDE.

What is the best way to convert these reports to the new plugin?

I can create a new dataview, copy the SQL from the old dataview, and
delete the old dataview. Everything works fine, but when I reopen the
report in the designer, then the data settings dialog reverts back to
BDE.

Mike

Comments

  • edited July 2004
    Hi Mike,

    Are these reports on a database or are they in file fomat? If they are on
    your database, you will need to edit the text of the template files using a
    method similar to the one in the example below. My suggestion would be to
    create a new report with the new plugin settings and compare the text of
    that .rtm file to the text of one you need to convert as a reference to what
    needs to be done.

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

    If your reports are in file format, you will need to manually save them down
    in ASCII format and compare that to the new report I mentioned above. Then
    it would be possible to create a small app to do the conversions for you
    once you find out what needs to be done. We have had many customers in the
    past use this method with success.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited July 2004
    >Are these reports on a database or are they in file fomat? If they are on

    The reports are in file format as .rtm files. How do I manually save
    them in ASCII format?

    Mike
  • edited July 2004
    Hi Mike,

    You can do this on the fly at run time by streaming the .rtm file and then
    using the same technique used in the example I sent in my last post, convert
    the binary file to ASCII text and manuplate it there. You will need to use
    the built in Delphi method ObjectBinaryToText to accomplish this.

    You can also simply load the template into an empty TppReport, set the
    Report.Template.Format published property to ftASCII and re-save. This
    would also do the trick.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited July 2004
    >You can do this on the fly at run time by streaming the .rtm file and then

    Ok, I think we are getting to the cause of the problem. When I try to
    open the converted report, it gives me an "error reading template"
    error. The message says "class TdaSDACQueryDataView not found." What
    would cause this error?

    Mike
  • edited July 2004
    Are you loading these templates at design time? If so, you will need to
    create a design package for the plugin you created and install it in the
    Delphi IDE to resolve this error. If you look at some of the plugins that
    are included with ReportBuilder (IBObjects for example) you will see the
    design packages that we have created for this purpose. You can use these as
    a starting point to creating your own and installing it.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.