Custom preview dialog
Hi,
I've searched the forum some hours but I can't find any step-by-step instructions
on how to create a custom preview dialog.
What I want to do is basically use standard functionality of the default
preview dialog, but:
The user has the option to select option "Create PDF and E-mail".
This will create a PDF-file fo the report and send it by E-mail. In that
case the print-button will be hidden from the previewform and a E-mail-button
will be displayed instead.
The E-mail-button will execute some custom code to send the PDF as attachment
to the customer (using my own E-mail function within the application).
Can anybody help me on how to set this up in an easy way?
I've searched the forum some hours but I can't find any step-by-step instructions
on how to create a custom preview dialog.
What I want to do is basically use standard functionality of the default
preview dialog, but:
The user has the option to select option "Create PDF and E-mail".
This will create a PDF-file fo the report and send it by E-mail. In that
case the print-button will be hidden from the previewform and a E-mail-button
will be displayed instead.
The E-mail-button will execute some custom code to send the PDF as attachment
to the customer (using my own E-mail function within the application).
Can anybody help me on how to set this up in an easy way?
This discussion has been closed.
Comments
The following article should get you started in the right direction.
http://www.digital-metaphors.com/rbWiki/Output/Preview/How_To...Add_a_Button_to_the_Preview
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
How do I get the imageindex of available images in ToolImageList? I there
a way to show these images somehow?
I want to add an Email button.
Thanks, Stef
FNewButton.ImageIndex := ToolImageList.AddTool('PPEMAIL'); //Index of
image in ImageList
Thank you for the help.
Is there a way to hide the added button by code? Please give an example on
how to do it.
Regards,
Stef
Once you create a new button, the only way to access it from the report is
by using the TppPrintPreview.Toolbar property.
TppPrintPreview(ppReport1.PreviewForm).Toolbar.Items[0].Visible := False;
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Thank you very much. Your solution works perfectly.
Regards,
Stef