Problem printing form a multiple instance report form
Hi,
Situation
- Multiple instances of a reportform
-Default report and datapipelines reside on a seperate datamodule
-Each reportform will create its own datamodule with the default report and
datapipelines
Instance1
If the report exists in the database the report from the database is loaded
otherwise the default report from the datamodule is used
Report is printed
Instance2
If the report exists in the database the report from the database is loaded
otherwise the default report from the datamodule is used
Report is printed
Problem all the datapipelines from the loaded report from the database link
to the datapipelines on the datamodule from Instance1
I don't want to iterate thru all the objects from the report relinking the
datapipelines to the appropriate 1 on the datamodule from Instance1
If i only use 1 instance off the datamodule with the default report and
datapipelines for both instances off the reportform then both reports print
fine, but this is not what i want
Greetings,
Filip Moons
Situation
- Multiple instances of a reportform
-Default report and datapipelines reside on a seperate datamodule
-Each reportform will create its own datamodule with the default report and
datapipelines
Instance1
If the report exists in the database the report from the database is loaded
otherwise the default report from the datamodule is used
Report is printed
Instance2
If the report exists in the database the report from the database is loaded
otherwise the default report from the datamodule is used
Report is printed
Problem all the datapipelines from the loaded report from the database link
to the datapipelines on the datamodule from Instance1
I don't want to iterate thru all the objects from the report relinking the
datapipelines to the appropriate 1 on the datamodule from Instance1
If i only use 1 instance off the datamodule with the default report and
datapipelines for both instances off the reportform then both reports print
fine, but this is not what i want
Greetings,
Filip Moons
This discussion has been closed.
Comments
When you load a report from file or database, it automatically looks for and
connects to the first datapipeline it finds with the name it was saved down
with. One option would be to try placing the report object on the
datamodule to ensure the proper datapipeline is found and used first.
Otherwise the only way to force it to use different pipelines located on a
different datamodule would be to manually change them when the template is
loaded (using the OnLoadEnd event perhaps of the template itself).
Another option you may consider is keeping all your data access local to
each template with the use of DADE. This would remove the need for any
datapipelines and any confusion between which connections need to be made
for separate reports.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
datamodule to ensure the proper datapipeline is found and used first. >
Thanks for the help Nico, above works fine.