Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

PrintToDevices and OnGetAutoSearchValues

edited February 2004 in General
Hello,

I am using PrintToDevices to generate report output
in a background process (no user interaction).
Unfortunatly PrintToDevices doesn't call the OnGetAutoSearchValues
event, which
we need.
How can I achieve this behaviour? I figured out something like
the following code:


aDevice := TcpArchiveDevice.Create(NIL);
aDevice.Publisher := aReport.Publisher;
aDevice.PageSetting := psAll;
aDevice.Active := True;

aReport.SendEventNotify(aReport, ciReportBeforeAutoSearchDialogCreate,
NIL);
aReport.SendEventNotify(aReport, ciReportGetAutoSearchValues, NIL);
aReport.PrintToDevices;

I want to know if this is OK or if there is a better solution.

Thanks

Frank Neuhaus
CPA SoftwareConsult GmbH

Comments

This discussion has been closed.