Generate PDF output
Michal_Kovar
Czech Republic
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.
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
Hi, still no progress but I submitted the ticket. Meanwhile, do you have any idea about solving this problem?
Regards Michal