Adding preview buttons to TfrxPreview

edited 5:07PM in FastReport 4.0
Is there some way to add the preview buttons that are displayed with ShowReport() when you use the TfrxPreview object? What I had before was a TfrxPreview object embedded on a page that had the Caption set to the report Description. That worked great, but there were no buttons to do print, zoom, etc. I changed the code to do ShowReport() without setting the Preview property, which worked great as far as showing the buttons but the I lost the Caption that showed the report description. Is there someway to combine the two? Possible solutions?

1. Add a property to the TfrxPreview object ShowPreviewButtons or UseReportPreivewOptions (or ?) to honor the PreviewOptions of the underlying report (this would be best)
2. Add someway to get a handle to the "default" preview window (maybe there is some way to do this already?) so that form can be customized at run-time
2. Set the Caption of the "default" preview window to the Description of the Report (this is the least powerful but probably the easiest thing to do)

Comments

  • edited 5:07PM
    aecspades wrote: »
    Is there some way to add the preview buttons that are displayed with ShowReport() when you use the TfrxPreview object? What I had before was a TfrxPreview object embedded on a page that had the Caption set to the report Description. That worked great, but there were no buttons to do print, zoom, etc. I changed the code to do ShowReport() without setting the Preview property, which worked great as far as showing the buttons but the I lost the Caption that showed the report description. Is there someway to combine the two? Possible solutions?

    1. Add a property to the TfrxPreview object ShowPreviewButtons or UseReportPreivewOptions (or ?) to honor the PreviewOptions of the underlying report (this would be best)
    2. Add someway to get a handle to the "default" preview window (maybe there is some way to do this already?) so that form can be customized at run-time
    2. Set the Caption of the "default" preview window to the Description of the Report (this is the least powerful but probably the easiest thing to do)

    You've probably worked this out already but just in case someone else searches, in answer to point 2, you can access the default preview form in the frxReport->OnPreview event by using something like frxReport1->PreviewForm

    Hope this helps

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.