How to insert report objects with adjusted defaults settings?
Hello,
I would like to have an ability to change the predefined options of an
object, when the end user is adding that object to the report.
An example:
if I add an ppImage to my report, the settings "Stretch" and
"MaintainAspectRatio" both are set to false by default. I would like to have
them set to true everytime the user add an other ppIgame / ppDBImage to his
reports.
So either a way to change those setting in general or a way (event) to
change them when the ppImage is being adding.
How can I achieve that?
I would like to have an ability to change the predefined options of an
object, when the end user is adding that object to the report.
An example:
if I add an ppImage to my report, the settings "Stretch" and
"MaintainAspectRatio" both are set to false by default. I would like to have
them set to true everytime the user add an other ppIgame / ppDBImage to his
reports.
So either a way to change those setting in general or a way (event) to
change them when the ppImage is being adding.
How can I achieve that?
This discussion has been closed.
Comments
You can use the Designer.OnCreateComponent event to initialize certain
components when they are added to a report...
uses
ppCtrls;
procedure TForm2.ppDesigner1CreateComponent(Sender: TObject; Component:
TComponent);
begin
if Component is TppImage then
TppImage(Component).Stretch := True;
end;
Another option would be to create your own custom component and register it
with ReportBuilder. See the demo located in the \Demos\6. RCL\... directory
for an example of this.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
somehow I keep forgetting the ppDesigner most of the time and am looking for
such events within the ppReport...
With your tip it works perfectly, thank you very much!
Mark