Report.DeviceType in Subreports
Hi,
We use RBuilder 18.01.
we have Report1 (Headerdefinition) which is loaded in other reports as
a subreport.
My question is:
How can I determin the devicetype of the parentreport in the subreports
(with loaded "Report1")?
Also I found out that on printing a report into a file (e.g. PDF)
"Report.DeviceType" seems not be changed to "PDF".
Within RAP i get "Printer" as devicetype.
Thank you, for your support,
Josef
We use RBuilder 18.01.
we have Report1 (Headerdefinition) which is loaded in other reports as
a subreport.
My question is:
How can I determin the devicetype of the parentreport in the subreports
(with loaded "Report1")?
Also I found out that on printing a report into a file (e.g. PDF)
"Report.DeviceType" seems not be changed to "PDF".
Within RAP i get "Printer" as devicetype.
Thank you, for your support,
Josef
This discussion has been closed.
Comments
1. When accessing the main report from a subreport, you will want to use
the Report.ParentReport property. Once you load your header report into
a subreport it becomes a TppChildReport.
2. The Report.DeviceType property will remain consistent with its
initial value regardless what is selected in the Print dialog. If you
would like to know what a user selected in the Print dialog, you can
access the TppReport.PrintDialog.DeviceType property.
Below is some sample RAP code I tested to show the device selected by
the user in the print dialog from within the subreport.
procedure Subreport1OnPrint;
begin
if Report.ParentReport.FileDevice <> nil then
ShowMessage(Report.ParentReport.PrintDialog.DeviceType);
end;
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com