Non-modal user preview form
I am using in my applications custom modal preview dialog. If I try to show this form as non-modal the preview is not painted.
If I set frxPreview.setFocus before calling ShowPreparedRepot the content of preview is painted but after the Window needs to be repainted access violation accurs and application crashes. I am using the latest version of FR.
My code is
Application.CreateForm(TPreviewForm, PreviewForm);
frxReport.Preview := PreviewForm.frxPreview;
frxReport.LoadFromFile('xxx.fr3');
frxReport.PrepareReport;
frxReport.ShowPreparedReport;
and now:
PreviewForm.ShowModal; -->> works properly, I use this for a long time
but if i call
PreviewForm.Show;
the preview is not painted and after the window needs to be repainted => access violation and application crashes.
I am not able to determine what I am doing wrong.
Jiri Binder
If I set frxPreview.setFocus before calling ShowPreparedRepot the content of preview is painted but after the Window needs to be repainted access violation accurs and application crashes. I am using the latest version of FR.
My code is
Application.CreateForm(TPreviewForm, PreviewForm);
frxReport.Preview := PreviewForm.frxPreview;
frxReport.LoadFromFile('xxx.fr3');
frxReport.PrepareReport;
frxReport.ShowPreparedReport;
and now:
PreviewForm.ShowModal; -->> works properly, I use this for a long time
but if i call
PreviewForm.Show;
the preview is not painted and after the window needs to be repainted => access violation and application crashes.
I am not able to determine what I am doing wrong.
Jiri Binder
Comments