PrintToFile and ReportExplorer
Hello!
I'm having problem with getting the PrintToFile-part of the Print dialog box
to appear.
Example:
I load the FlashFiler EndUser Demo.Then I add a Pragnaan MasterControl to
the form, and set the property AllowPrintToFile on ppReport1 to True.
When the print dialog appears in the compiled program, it doesn't show any
"PrintToFile"-section.
What property am I missing?
/Johan
I'm having problem with getting the PrintToFile-part of the Print dialog box
to appear.
Example:
I load the FlashFiler EndUser Demo.Then I add a Pragnaan MasterControl to
the form, and set the property AllowPrintToFile on ppReport1 to True.
When the print dialog appears in the compiled program, it doesn't show any
"PrintToFile"-section.
What property am I missing?
/Johan
This discussion has been closed.
Comments
you need to set this property after the report template is loaded.
-------------------------------------------------
Tech Tip: How to use the OnLoadEnd public event
-------------------------------------------------
This tech tip explains how to control report property settings when
saved reports are loaded by assigning an event handler to the OnLoadEnd
event of the Report.Template object.
The first thing we need to to is to declare the an event handler for the
OnLoadEnd event:
private
procedure LoadEndEvent(Sender: TObject);
Then we need to assign the event handler when the form or datamodule
containing the report component is created:
procedure TForm1.FormCreate(Sender: TObject);
begin
ppReport1.Template.OnLoadEnd := LoadEndEvent;
end;
Next we need to implement the event handler, setting the property values
of the report:
procedure TForm1.LoadEndEvent(Sender: TObject);
begin
ppReport1.AllowPrintToArchive := True;
end;
Any published properties of a report component which is used to load
saved reports can be restored to the necessary settings using this
technique. When a saved report is loaded, the published properties of
the report are set the values as they exist in the saved version. These
settings depend on the state of the report component when the report was
initially saved, and they may not be the ones you want. By assigning
this event handler, we can control the report component property values
regardless of the values which exist in the saved version of the report.
HTH,
Chris Ueberall;
Thanks!
I found the Tech-Tips group. Very smart idea!