out of memory export to Excel of 1300 pages
I use one of your partners database i.e. NexusDB.
I have a report based on a dataset with almost 68.000 records.
The report is rather simple. It contains one header for defining the fields.
The Masterband contains 120 fields in one line.
De report can be prepared, no preview is done, the code executes the export function.
The export to Excel runs out of memory.
When I look at taskmanager Memory use jumped from +/- 1230 to 2244 in total. (I broke the export myself at page 150 of export about 1300 pages).
1230 MB: Before starting te porcess of opening the query
1532 MB: Before Report.preparereport
1856 MB: After 500 pages preparing
1976 MB: Upon starting Report.export
2033 MB: after exporting page 30
2244 MB: after exporting page 150
What should I look for to not use so much memory. Diagnostics above are with the frxXLSExport UseFileCache set to TRUE
I have a report based on a dataset with almost 68.000 records.
The report is rather simple. It contains one header for defining the fields.
The Masterband contains 120 fields in one line.
De report can be prepared, no preview is done, the code executes the export function.
The export to Excel runs out of memory.
When I look at taskmanager Memory use jumped from +/- 1230 to 2244 in total. (I broke the export myself at page 150 of export about 1300 pages).
1230 MB: Before starting te porcess of opening the query
1532 MB: Before Report.preparereport
1856 MB: After 500 pages preparing
1976 MB: Upon starting Report.export
2033 MB: after exporting page 30
2244 MB: after exporting page 150
What should I look for to not use so much memory. Diagnostics above are with the frxXLSExport UseFileCache set to TRUE
Comments
it would be good to tell us what version and build# of fr you are using also.
I've checked the printer and it says to immediately start printing. Is that what you mean?
Underneath the extra info you inquired after, with which I hope you can help me.
Fastreport 4.5 is used.
The following code runs the export after de ReportDataset is prepared:
Report.PrepareReport;
case ExportForm.ExportType of
expCSV : Filter := frxCSVExport;
expHTML : Filter := frxHTMLExport;
expExcel : Filter := frxXLSExport;
expTxt : Filter := frxTxtExport;
expsimpleTxt : Filter := frxSimpleTextExport;
end;
Filter.showProgress := true;
Filter.ShowDialog := true;
Filter.usefilecache := true;
Report.Export(Filter);
The reportproperties taken from the .dfm
object Report: TfrxReport
Version = '4.5'
DataSet = ReportDataset
DataSetName = 'Data'
DotMatrixReport = False
IniFile = '\Software\Fast Reports'
PreviewOptions.AllowEdit = False
PreviewOptions.Buttons = [pbPrint, pbExport, pbZoom, pbFind, pbOutline, pbPageSetup, pbTools, pbNavigator]
PreviewOptions.Zoom = 1.000000000000000000
PrintOptions.Printer = 'Default'
PrintOptions.PrintOnSheet = 0
PrintOptions.ShowDialog = False
ReportOptions.CreateDate = 38503.818346886570000000
ReportOptions.LastChange = 38503.818346886570000000
ScriptLanguage = 'PascalScript'
ScriptText.Strings = (
'begin'
''
'end.')
ShowProgress = False
StoreInDFM = False
Left = 128
Top = 24
End
The Filterproperties taken from .dfm:
object frxXLSExport: TfrxXLSExport
ShowDialog = False
UseFileCache = True
ShowProgress = True
OverwritePrompt = True
ExportStyles = False
MergeCells = False
OpenExcelAfterExport = True
Wysiwyg = False
AsText = True
Background = False
FastExport = True
PageBreaks = False
EmptyLines = False
SuppressPageHeadersFooters = True
Left = 264
Top = 88
end
look under engine options of the tfrxreport component
check the usefilecache property this may help, also maxmemsize.
you may also want to update to the latest build 4.7.157 considering you are 2 full versions behind
and a number of memory leaks have been fixed since 4.5.
So I'll try to update to the stable 4.7 version and hopefully my problem is solved.
you may also go to support on your d/lpage and take out a support ticket.
personally i have not run reports with that many pages.