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

Loading Reports from database

edited April 2006 in General
In the past, the following code worked properly. Since going to version
10.01 it does not.
The database (SQL) is positioned to a report and first time, the code does
load the report and show it properly. However, if the user positions to a
different record, the first report shows rather than the new report. I have
tested and it is getting the correct report name from the data record but
the old report continues to be displayed. I am using a text field in the
database.

ppReport1.Template.DatabaseSettings.Name :=sqlReportsReportName.AsString;
ppReport1.SaveAsTemplate :=True;
try
ppReport1.Template.LoadFromDatabase;
ppReport1.Template.FileName
:=ppReport1.Template.DatabaseSettings.Name+'.rtm';
ppReport1.Modified :=False;
ppReport1.Reset;
ppReport1.DeviceType :='Screen';
ppDesigner1.Show;
except
raise;
end;

As mentioned, it has always worked fine in the past but since going to new
version the problem occurs.

Thanks,
Bob Tucker

Comments

  • edited April 2006

    Try updating to RB 10.02, we have fixed some designer related issues that
    may be related to this. (If you did not receive download info, send your
    serial number and registration to info@digital-metaphors.com and request
    it).

    It may be that the report is getting loaded but the designer is not getting
    updated to reflect the change (we fixed a bug related to that). To test this
    try replacing the ppDesigner1.Show with ppReport.Print and see which report
    appears in the preview form.



    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited April 2006
    The update to 10.02 did resolve the problem.

    Thanks,
    Bob

  • edited April 2006
    I'm having this problem as well, but I'm using 10.02 already. I'm also
    using the TppExplorer. What happens to me is that the first two reports I
    open to Print or Design will load properly, but the third report will open
    with the 'Design' tab completely blank. The "Data Tree" will show the
    Pipelines from the previous report that was successfully opened. (The
    'Data' tab is also blank.)

    I am using an "OnLoadStart" event which doesn't fire when the report fails
    to open (report three).

    When I tried to use Report.FreeModules before opening the report, I would
    get an AV on that unsuccessful third report I tried to open.

    Leah




  • edited April 2006

    I will email you a patch to RB 10.02 that I think will resolve this issue.




    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.