showing multireports in pagecontrol
Hi,
I use RB 6.02 to show a series of reports on a TFrame ancestor.
Each report is in its own viewer in a tab which is on a pagecontrol.
I create and destroy these report/viewer combinations at runtime myself.
For some reason the first report is fine but all the following reports will
have their sub totals set to the same value as the first report!!! Even
though all the other numbers are correct!
Any ideas how this could happen?
The reports are owned by a datamodule not a form. Could this be the problem?
regards
Brett Johansen
SDA
I use RB 6.02 to show a series of reports on a TFrame ancestor.
Each report is in its own viewer in a tab which is on a pagecontrol.
I create and destroy these report/viewer combinations at runtime myself.
For some reason the first report is fine but all the following reports will
have their sub totals set to the same value as the first report!!! Even
though all the other numbers are correct!
Any ideas how this could happen?
The reports are owned by a datamodule not a form. Could this be the problem?
regards
Brett Johansen
SDA
This discussion has been closed.
Comments
correct datapipeline (it should be the same pipeline that is connected to
the current report).
Are the subtotals coming from TppDBCalcs or are you using TppVariables and
coding their OnCalc event handlers?
It shouldn't matter if the report is owned by a datamodule or a form, it
should work either way.
Additional info on frames:
Delphi 6 Frames (TFrame) are containers that enable collections of
components to be visually configured and re-used. Unlike form inheritance,
however, Delphi 6 does not permit new components to be added to frame
descendants (i.e. frames embedded on forms or other frames).
Therefore, if a Report object is placed on a frame, the report layout must
be maintained entirely in the top level ancestor. You cannot access a form
containing the frame and add report components, nor can new report layouts
be loaded from templates.
ReportBuilder's DBPipeline and BDEPipeline components cannot currently be
used with frames. Both of these components automatically create Field
components (i.e. AutoCreateFields) when a dataset is opened. This behavior
will cause access violations if a data pipeline is placed in a descendant
frame.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com