Does NOT exist is correct:) We never could figure out how to fix the problem in D5 for data modules and reports.
"I've been told not to place a TppReport on TDataModules, but I prefer to keep my non-visual components on data modules. TppReport is non-visual, why can't I do that?"
There are two good reasons to avoid placing your TppReport component on a TDataModule:
1. While TppReport is ostensibly a non-visual component, the components which make up the report (TppLabel, TppLine, TppMemo, etc.) are obviously visual. Although the report designer is provided to allow for visual creation of reports, it cannot be the owner of these visual components. Therefore, when controls are created during the layout process, they are given another owner - the form which owns the TppReport (Obviously the TppReport cannot own them either). The end result of this is that when laying out a report that is owned by a TDataModule, you are effectively adding visual components to an object that was never intended to own visual components. This can result in very unpredictable results.
2. The TDataModule designer in Delphi 5 was redesigned to include a treeview which enumerates the various components owned by the data module and their properties. As a result, when a component that is owned by the module is modified, the designer recurses all the components and populates the tree with their property values. When a TppReport is placed on a TDataModule, many components and properties are added to that tree. The process of constantly updating these values can tend to cause a very large performance lag in larger, more complex reports.
Comments
problem in D5 for data modules and reports.
"I've been told not to place a TppReport on TDataModules, but I prefer to
keep my non-visual components on data modules. TppReport is non-visual, why
can't I do that?"
There are two good reasons to avoid placing your TppReport component on a
TDataModule:
1. While TppReport is ostensibly a non-visual component, the components
which make up the report (TppLabel, TppLine, TppMemo, etc.) are obviously
visual. Although the report designer is provided to allow for visual
creation of reports, it cannot be the owner of these visual components.
Therefore, when controls are created during the layout process, they are
given another owner - the form which owns the TppReport (Obviously the
TppReport cannot own them either). The end result of this is that when
laying out a report that is owned by a TDataModule, you are effectively
adding visual components to an object that was never intended to own visual
components. This can result in very unpredictable results.
2. The TDataModule designer in Delphi 5 was redesigned to include a treeview
which enumerates the various components owned by the data module and their
properties. As a result, when a component that is owned by the module is
modified, the designer recurses all the components and populates the tree
with their property values. When a TppReport is placed on a TDataModule,
many components and properties are added to that tree. The process of
constantly updating these values can tend to cause a very large performance
lag in larger, more complex reports.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
and it should work just fine:)
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com