We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Using groupCaptionTemplate makes PDF/Excel export to slow

When using the AggregateColumnDirective and using the groupCaptionTemplate props, the export of excel and PDF is slower in orders of magnitude. Without it, the export of 4000 grouped rows takes around 7 seconds. With the   groupCaptionTemplate set, it takes around 7 minutes.


Is this a known issue with the version I'm working on? Any other thoughts on this?

The versions are:

    "@syncfusion/ej2-react-buttons": "^19.4.55",
    "@syncfusion/ej2-react-calendars": "^19.4.56",
    "@syncfusion/ej2-react-charts": "^19.4.54",
    "@syncfusion/ej2-react-dropdowns": "^19.4.56",
    "@syncfusion/ej2-react-grids": "^19.4.56",
    "@syncfusion/ej2-react-heatmap": "^19.4.52",
    "@syncfusion/ej2-react-inputs": "^19.4.52",
    "@syncfusion/ej2-react-pivotview": "^19.4.55",
    "@syncfusion/ej2-react-querybuilder": "^19.4.56",
    "@syncfusion/ej2-react-richtexteditor": "^19.4.56",


The grid is used as:

{this.props.columnsAggregate && (
                    <AggregatesDirective>
                        <AggregateDirective>
                            <AggregateColumnsDirective>
                                {this.props.columnsAggregate.map(aggregate => {
                                    if (aggregate.type === 'Custom') {
                                        return (
                                            <AggregateColumnDirective
                                                key={aggregate.field}
                                                field={aggregate.field}
                                                type={aggregate.type}
                                                format={aggregate.format}
                                                customAggregate={aggregate.customCalculation}
                                                // groupCaptionTemplate={this.headerCustomTemplate} This makes export take too long, check with higher version (>19.4)
                                            />
                                        )
                                    } else {
                                        return (
                                            <AggregateColumnDirective
                                                key={aggregate.field}
                                                field={aggregate.field}
                                                type={aggregate.type}
                                                format={aggregate.format}
                                                // groupCaptionTemplate={this.headerSum} This makes export take too long, check with higher version (>19.4)
                                            />
                                        )
                                    }
                                })}
                            </AggregateColumnsDirective>
                        </AggregateDirective>
                    </AggregatesDirective>
                )}




1 Reply

VB Vinitha Balasubramanian Syncfusion Team December 2, 2022 04:58 PM UTC

Hi GUU,


Greetings from Syncfusion support.


Query : Using groupCaptionTemplate makes PDF/Excel export to slow


Based on your requirement, you want to export large data from the Grid. When we export a larger amount of data with the groupCaptionTemplate, the Grid draws each cell data into the pdf file. Due to this cell manipulation, it leads the performance issue in browser.


To overcome this, we suggest you to perform exporting on the server-side. This is explained detailly in the below documentation,


EJ2Grid Server Exporting:

https://ej2.syncfusion.com/react/documentation/grid/pdf-export/exporting-grid-in-server/

https://ej2.syncfusion.com/react/documentation/grid/excel-export/exporting-grid-in-server/


Regards,

Vinitha Balasubramanian


Loader.
Live Chat Icon For mobile
Up arrow icon