Adding preview buttons to TfrxPreview
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)
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
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