TppReportExplorer.PrintPreview changed in 7.04!
Hi,
By trial and error I discovered that the code for
TppReportExplorer.PrintPreview changed dramatically, making all custom
Explorer Forms misbehave. Correct me if I am wrong, but I am almost certain
that the behaviour in the old release was like this:
procedure TppReportExplorer.PrintPreview(const aReportName: String;
ItemId: Integer);
This was changed in 7.04 to:
procedure TppReportExplorer.PrintPreview(const aReportName: String;
aFolderId: Integer);
Unfortunatly this doesn't show up as an error when compiling. It does
however prevent custom ReportExplorer forms from locating the right report
in the database. It did cost me quite some time to figure out what went
wrong.
This should really be included in the release notes. I think a lot of
people will run into this too...
The examples on the Digital Metaphors website show an incorrect behaviour
now too (for example http://www.digital-
metaphors.com/tips/ReportExplorerWithReadOnly.zip uses ItemId too, making
the preview and print buttons doing nothing!).
ARGH!
--
Maarten
The difference between theory and practice in practice is greater than the
difference between theory and practice in theory.
By trial and error I discovered that the code for
TppReportExplorer.PrintPreview changed dramatically, making all custom
Explorer Forms misbehave. Correct me if I am wrong, but I am almost certain
that the behaviour in the old release was like this:
procedure TppReportExplorer.PrintPreview(const aReportName: String;
ItemId: Integer);
This was changed in 7.04 to:
procedure TppReportExplorer.PrintPreview(const aReportName: String;
aFolderId: Integer);
Unfortunatly this doesn't show up as an error when compiling. It does
however prevent custom ReportExplorer forms from locating the right report
in the database. It did cost me quite some time to figure out what went
wrong.
This should really be included in the release notes. I think a lot of
people will run into this too...
The examples on the Digital Metaphors website show an incorrect behaviour
now too (for example http://www.digital-
metaphors.com/tips/ReportExplorerWithReadOnly.zip uses ItemId too, making
the preview and print buttons doing nothing!).
ARGH!
--
Maarten
The difference between theory and practice in practice is greater than the
difference between theory and practice in theory.
This discussion has been closed.
Comments
Sorry that the release notes were not more clear. I forgot that the bug fix
would affect developers who created custom report explorer forms.
The ReportExplorer uses a custom ListView class called TppItemList. This
class has an ItemID property that was incorrectly returning the value of the
FolderID. RB 7.04 fixes this bug (see 15a. in the release notes).
To specify a report stored in the report explorer tables, requires that the
ItemName and FolderID be specified. Code that was incorrectly using the
ItemID worked prior to the bug fix because the ItemID returned the FolderID
value. Confusing huh? A case of two bugs making a right.
--
Thanks for supporting ReportBuilder! Please vote for ReportBuilder in the
Delphi Informant Readers Choice awards!
http://www.delphizine.com/ballot2004/
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com