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

Saving to File (from Database)

edited March 2006 in General
Hi,

In short, I have on a number of reports a property called OnTraversal. All
new reports made have this property.
We run report builder in 2 places in the program and in one we get an
OnTraversal error on the report.
If I save the report to file from where it does work. I see...

....
object Linked_Bookings: TppChildBDEPipeline
AutoCreateFields = False
UserName = 'Linked_Bookings'
OnTraversal = ppBDEPipelineTraversal
....

If I remove the OnTraversal line, save the text file and reload it into
report, it works fine!

In short, what I want to be able to do is run a routine against the database
to save the report manually to a StringList so I can search for this
property, remove it and save it back to the database.

How can I do this? Are there any notes on how to do this anywhere?

(I would also like to save the master list of reports out to file so they
can be uploaded to our user download area as well so this has a double wammy
for me)

Thanks in advance.

Steve

Comments

  • edited March 2006
    It looks like that the report is looking for a published method called
    ppBDEPipelineTraversal but can not find it when it is loaded--you can stub
    out a dummy if you want and the problem should go away. Just add the
    declaration above the 'private':

    procedure ppBDEPipelineTraverseal(sender: TObject); // I am not sure what
    the params are suppose to be--just match the other ones

    and then write the implementation

    procedure TMyObjectName.ppBDEPipelineTraverseal(sender: TObject);
    begin
    //stub this out
    end;

    The best way to get around this (if the reports get complicated it gets to
    be bad coding very quickly) is to use RAP and create pass through functions,
    but that is your call.

    HTH,
    Ed Dressel
    Team DM

  • edited March 2006
    The bit that is confusing is that I do not have anywhere in my code a
    procedure called ppBDEPipelineTraverseal.
    Taking that however I've added a ppBDEPipeline and a TQuery onto the form
    and linked these to the report. I've set an on traversal event and it seems
    to work now.

    Thanks for the help.
    Steve

This discussion has been closed.