Generate PDF output

Michal_KovarMichal_Kovar Czech Republic
edited 6:48AM in FastReport 4.0
Hello,
I have a problem with FastReport printing (VCL).
During the generation, error occurs randomly. Reports are generated repeatedly, each time with different data (using the Filter property).

Below is a procedure for generating a report.


Generate a report:::::::::::::::::::::::::::::::::::: (for each type of document I create one instance, then I change only the filter)

TfrxReport* report = new TfrxReport(query);
report->EngineOptions->MaxMemSize = 1024;
report->EngineOptions->UseFileCache = true;
report->EngineOptions->EnableThreadSafe = true;
report->EngineOptions->SilentMode = true;

report->LoadFromFile(.....);
//----sets variables
report->Variables->DeleteVariable(...);
report->Variables->AddVariable(..., ..., ...);
.....
//::::::::::::::::::::::::::::::::::::::::::::::::::

After determining the type of report and obtaining its instance I change the filter:::::::::

TfrxADOQuery * query = findReportQuery(report); // method finds the first TfrxADOQuery Components[...] member of the 'report' instance
query->Filter = ...
query->Filtered = true;
//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

Finally report gets prepared for printing::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

report->PrepareReport(true); -- // this method ocassionally throws exceptions like "Dataset 'ADOQuery1' does not exist" or "out of memory"
report->Print();

---- exception is thrown randomly (the same set of reports gets sometimes printed successfully, sometimes not. With completely the same data and settings.)

Thanks for help in advance.

Comments

  • Michal_KovarMichal_Kovar Czech Republic
    edited 6:48AM
    austingrd wrote: »
    Hi. Michal, any luck on this so far? I would also like to suggest to create a support ticket on this.

    Hi, still no progress but I submitted the ticket. Meanwhile, do you have any idea about solving this problem?
    Regards Michal

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.