Report.OnBeforePrint cannot switch DataPipeline in 7.02
I just upgraded my reporting machinery to 7.02 (from 6.03).
Due to an error in my implementation the Report's DataPipeline was
usually switched to one of the other pipelines during load, so reports
switched it back in Report.OnBeforePrint.
After installing 7.02 and correcting for differences here and there,
these report generally fail with ECodeError, "Could not run program:
OnBeforePrint". The offending statement is in one case:
"report.datapipeline:=organisasjon;"
The Report.DataPipeline property is not listed as ReadOnly.
Is there a good reason for this? I have corrected the error that
necessitated this RAP code, but customers have existing reports that
will be broken and need manual correction. That would be nice to avoid.
-tor
--
-------
gitek as
Due to an error in my implementation the Report's DataPipeline was
usually switched to one of the other pipelines during load, so reports
switched it back in Report.OnBeforePrint.
After installing 7.02 and correcting for differences here and there,
these report generally fail with ECodeError, "Could not run program:
OnBeforePrint". The offending statement is in one case:
"report.datapipeline:=organisasjon;"
The Report.DataPipeline property is not listed as ReadOnly.
Is there a good reason for this? I have corrected the error that
necessitated this RAP code, but customers have existing reports that
will be broken and need manual correction. That would be nice to avoid.
-tor
--
-------
gitek as
This discussion has been closed.
Comments
event. The timing to switch the pipeline would be the global OnCreate event.
The BeforePrint event is the event which fires after the pipeline is open
and everything is ready, which is the instant before it engine begins to
start generating pages. If you could switch the RAP event for you code, does
it work for you? If your change is to remove the RAP code, then for you
users you'll want to load their reports programatically and change the RAP
code in Delphi code. Here is an exmaple of moving a group event from one
group to another group.
http://www.digital-metaphors.com/tips/MoveGroupHeaderBeforePrint.zip
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
assignments to DataPipeline, and now the reports run without any manual
intervention.
-tor
-------
gitek as