- The second time I clicked to see the preview dialog, the report did not show (only some black blocks)
- When I closed the application, I got several error messages.
Calling Preview() instead seem to fix the problem. Not sure what the problem was but this is from the QReport documentation:
Prepare
procedure Prepare.
Use ‘Prepare’ if you want to generate a report without automatically bring up a preview window or print it.
Preview
procedure Preview
Use ‘Preview’ to generate the report and bring up an on screen preview of it. From the preview window the user can choose to print the report.
PreviewModal
procedure PreviewModal
As Preview with the following differences -
When calling PreviewModal the report is generated in a background thread. Some database drivers are not thread safe and this might cause unexpected behavior or program crashes. Only use PreviewModal in situations where it is sure that a thread safe database driver will be used.
Ingen kommentarer:
Legg inn en kommentar