out of memory export to Excel of 1300 pages

edited 6:36PM in FastReport 4.0
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

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 6:36PM
    check the report component's settings as well as the export and make sure printspooler releases pages immediately.
    it would be good to tell us what version and build# of fr you are using also.
  • edited 6:36PM
    I am not to sure what you mean by: "make sure printspooler releases pages immediately.
    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

    gordk wrote: »
    check the report component's settings as well as the export and make sure printspooler releases pages immediately.
    it would be good to tell us what version and build# of fr you are using also.
  • gordkgordk St.Catherines On. Canada.
    edited 6:36PM
    yes that was what i meant.
    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.
  • edited 6:36PM
    I've figured that CSV export instead of XLS is using 1 Mbyte per page and every next page the memory usage goes back -1.
    So I'll try to update to the stable 4.7 version and hopefully my problem is solved.

    gordk wrote: »
    yes that was what i meant.
    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.
  • gordkgordk St.Catherines On. Canada.
    edited 6:36PM
    personally i would use the current daily build.
    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.

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.