Export all filtered entities with a Report

Hi Konstantin,
we’re trying to export a list of 20000 filtered entities from a screen (impementing DataGridPrintFormAction similar to TablePrintFormAction) but using report with xls(x) output we get the error : OutOfMemory.
How can we do that?
Thanks

Manuel Coli

2 Likes

Hi,
Could you share the whole Exception?
Where is your application deployed? Do you start the application in Studio?
By default Studio sets CATALINA_OPTS=-Xmx512m. Try to increase that value in tomcat/bin/setenv.bat - probably this could help. “External” Tomcat could also be tuned using setenv.bat.
Maybe standard ExcelAction is also appropriate for you. Did you try it? Probably it consumes less memory than report.

 <dataGrid id="someDataGrid"
                  datasource="someDs"
                  height="700px"
                  width="100%">

            <actions>
            ...
                <action id="excel"/>
            </actions>

            <columns>
                <column property="fldOne"/>
                <column property="fldTwo"/>
            </columns>
            <buttonsPanel id="buttonsPanel"
                          alwaysVisible="true">
             ...
                <button id="excelButton"
                        action="someDataGrid.excel"/>

            </buttonsPanel>
        </dataGrid>

Hi Rostislav,
i choose use of report instead of ExcelAction in reference of this topic:
https://www.cuba-platform.com/discuss/t/export-all-filtered-entities-with-standard-excel-export-action-not-only-paged-ones.
I’ve attached the exception.
If i use ExcelAction and set the rowlimit in the browser screen to 20000 the tomcat die without any exception.
Thanks

Manuel

exception.txt (10.3K)

Increasing the value in tomcat/bin/setenv.bat to CATALINA_OPTS=-Xmx1536m the situation does not change with both report and ExcelAction.
Please help

Manuel

Could you provide the code of your DataGridPrintFormAction?

Hi Konstantin,
here it is.

Thanks

M.

DataGridPrintFormAction.txt (5.9K)

Hi Manuel,

I don’t see anything wrong in your code, so the problem is probably in the report generation process. We already have some issues registered about poor performance and memory consumption by XLSX/DOCX report, see

https://youtrack.cuba-platform.com/issue/PL-9172
https://youtrack.cuba-platform.com/issue/PL-8598

You can try to use XLS output while we are working on these issues.