How to use DB reports
Hi,
Its not really clear to me how to use/print reports stored in a DB.
Consider we have 2 product reports stored in the db. Both reports need to be
printed from the same form using tables from a central datamodule. The
first report is a general product report which don't need additional code
attached to the report/component event handlers. The second report however
is a stocklist which needs additional code attached to the report/component
event handlers. fi negative stock values need to be printed in red using
TppDBText.BeforePrint event to keep it simple or ppVariables which have to
calculate certain values depending on the traversed record. But since the
code attached to the report/component event handlers resides in the reports
owner form. What's the best approach to link/delink the code from the owners
form to the appropriate report/component event handlers depending on the
type of report the user chooses to print (general/stock report). Am i making
sence or is there some easy way to do it differently which i haven't
discovered in ReportBuilder
Greetings,
Filip Moons
Its not really clear to me how to use/print reports stored in a DB.
Consider we have 2 product reports stored in the db. Both reports need to be
printed from the same form using tables from a central datamodule. The
first report is a general product report which don't need additional code
attached to the report/component event handlers. The second report however
is a stocklist which needs additional code attached to the report/component
event handlers. fi negative stock values need to be printed in red using
TppDBText.BeforePrint event to keep it simple or ppVariables which have to
calculate certain values depending on the traversed record. But since the
code attached to the report/component event handlers resides in the reports
owner form. What's the best approach to link/delink the code from the owners
form to the appropriate report/component event handlers depending on the
type of report the user chooses to print (general/stock report). Am i making
sence or is there some easy way to do it differently which i haven't
discovered in ReportBuilder
Greetings,
Filip Moons
This discussion has been closed.
Comments
The easiest way to perform a task like this with ReportBuilder is to use RAP
(included with RB Enterprise) and keep all your event code local to the
template saved on your database. This way there is no need to link existing
event code to your reports once they have loaded. See the following web
site for more information on RAP.
http://www.digital-metaphors.com/products/RAP/
When you load a report template into a report object on a form, all the
event references that were present when the report was initially saved will
be present. If the event names are consistant, the report should not have
an issue linking the event. If the names have changed, you will manually
need to change them in the template perhaps using the
Template.OnLoadEndEvent.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com