Generating report very slow when previewing

edited February 2017 in FastReport 4.0
Hello,

When generating report for about 26 000 records from a paradox table it takes 4 minutes I am using simple code like that:
QryEmpl.Open;
frxReport1.Clear;
frxReport1.LoadFromFile(PathName+'Report\badge_fr.fr3');
frxReport1.OldStyleProgress:=True;
frxReport1.ShowProgress:=True;
frxReport1.ShowReport();

And here is my query statement :
SELECT Employe.EMPLOYE_ID, Employe.EMPLOYEUR_ID, Employe.UNITE_ID, Employe.EMPLOYE_NOM, EMPLOYE.PHOTO_PATH,
Employe.EMPLOYE_PRENOMS, Employe.EMPLOI_ID, Employe.DATE_EMBAUCHE, Emploi.emploi, Unite.INTITULE
FROM "Employe.DB" Employe
   INNER JOIN "emploi.DB" Emploi
   ON  (Employe.EMPLOI_ID = Emploi.rowid)  
   INNER JOIN "unite.DB" Unite
   ON  (Employe.UNITE_ID = Unite.UNITE_ID)  
WHERE EMPLOYE.EMPLOYEUR_ID=:p1 AND EMPLOYE.SORTIE=FALSE


I don't think that comes from the query statement because the progress dialog box (preparing report) is shown just after the line :QryEmpl.Open;
And this is after the dialog box that becomes very slow. I also tried with the PrepareReport method.
I attached my fr3 report. Can you help me please ?

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 11:37AM
    Is report 1 or 2 pass
    have you set the report ccache
    I notice you are loading a lot of photos
  • edited February 2017
    Thanks gordk

    I tried with 1 and 2 pass in the component and by code.

    I also tried with the lines below :
    frxReport1.Clear;
    frxReport1.EngineOptions.DoublePass:=True;
    frxReport1.EngineOptions.TempDir:=Pathname;
    frxReport1.EngineOptions.MaxMemSize:=1000; (tried from 100 to 1000 in every compilation)
    frxReport1.EngineOptions.UseFileCache:=True;
    

    As for the photo, there is no photos in the stored folder and deactivate too the loading of photos in OBP of the MasterData the problem still remain.

    During the dialogbox preparation report I noticed that the temp file is created and deleted with sometimes 0 KB and sometimes with a few KiloByte about 18 KB (see my attached image)

    Thanks
  • edited 11:37AM
    Sorry,
    I thought that I wrote the line frxReport1.EngineOptions.MaxMemSize and it wasn't the case. So my problem is solved with :
    frxReport1.EngineOptions.MaxMemSize:=200;
    frxReport1.EngineOptions.UseFileCache:=True;
    

    Thanks gordk and have a good night.

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.