Extremely slow report when generated with more than 500 thousand records
Hello friends.
I have a serious performance problem in my application due to fastreport, I use the same to generate extremely large reports, where it is created from a TObjectList with the help of the frxUserDataSet component.
But when the list comes with more than 500,000 records, the ".preparereport" is very slow, taking more than 20 minutes to generate the report. I have tried several things to try to optimize but without success.
I would like some help from you to solve this problem.
I am attaching in the topic an example of how I use fastreport with the Delphi Seattle.
thanks in advance.
I have a serious performance problem in my application due to fastreport, I use the same to generate extremely large reports, where it is created from a TObjectList with the help of the frxUserDataSet component.
But when the list comes with more than 500,000 records, the ".preparereport" is very slow, taking more than 20 minutes to generate the report. I have tried several things to try to optimize but without success.
I would like some help from you to solve this problem.
I am attaching in the topic an example of how I use fastreport with the Delphi Seattle.
thanks in advance.
Comments
Doing it a different way was suggested by FR, but I'll have to search for the notes. I don't think it's the same as your problem, though.
1) I don't know enough about object lists to know how they are indexed, but creating an array of pointers to the objects may speed up data retrieval
2) Doing 10 reports of 5000 lines and concatenating the results in one preview may help, I'm sure that has been mentioned on the forum
FastReport uses variant types for aggregates , that means SUM function works even for string values and it concatenates string values 500 thousand times.
Use to return number values for fields used in agregate functions for all these aggregates :
[SUM(<VALOR_TOTAL>, MasterData, 1)]
[SUM(<VALOR_PRESTACAO>, MasterData, 1)]