DataGrid with Group and Caption Aggrerate exporting.

Hello,
A few questions/issues that I have with exporting an SfGrid via default toolbar enabled buttons.

Is exporting a SfGrid that contains a Grouping not (fully) supported?
I seem to have trouble seeing the proper columns show up when exporting to Excel and PDF.

In the sample/demo for Group and Caption Aggregate, I tried adding the toolbar and handler to export to excel, csv, and pdf ... (note: I found that the ID attribute needs to be added in order for the event to get fired/handled).

1. Excel exports without the GridAggregateColumns that are defined for the footer and caption, but the rest of the grid looks ok.  Would I have  to manually create the layout for the excel sheet in order to get at least the 'sum' aggregate? 

2. PDF exports with a missing column header and also no aggregate values.

btw - using v18.1.0.52 because of other (tooltip) issue.

Thanks for any help/insight that can be given.





3 Replies 1 reply marked as answer

RN Rahul Narayanasamy Syncfusion Team July 1, 2020 10:36 AM UTC

Hi Jimmy, 

Greetings from Syncfusion. 

We have validated your query and you have faced exporting issue with aggregates. We have already considered it as a bug and logged defect report for the same. Thank you for taking the time to report this issue “Grid Aggregates are not getting exported in Blazor ” and helping us improve our product. At Syncfusion, we are committed to fixing all validated defects (subject to technological feasibility and Product Development Life Cycle ) and including the defect fix in our upcoming  volume 2 main release which is expected to be rolled out in the first week of July, 2020.   
  
You can now track the current status of your request, review the proposed resolution timeline, and contact us for any further inquiries through this link.   
  
  
Till then we appreciate your patience. 

Regards, 
Rahul 


Marked as answer

RC Rogerio C Mauri April 7, 2023 07:46 PM UTC

We also encountered problems exporting Excel/PDF with aggregated columns.


When we remove the aggregation settings, the export is successfully executed.


The error occurs on: 'ExportToExcelAsync' and 'ExportToPdfAsync' with System.NullReferenceException (Object reference not set to an instance of an object).

Version NuGet Syncfusion: 21.1.38


    <GridAggregates>

        <GridAggregate>

            <GridAggregateColumns>

                <GridAggregateColumn Field="@nameof(PactuacaoProcedimentosUnidadeSaudeXItemPlanilha.QuantidadeValor)" Type="AggregateType.Sum" Format="C2">

                    <GroupFooterTemplate>

                        @{

                            var sumValue = (context as AggregateTemplateContext);

                            <div>

                                Qtde: @sumValue.Sum

                            </div>

                        }

                    </GroupFooterTemplate>

                </GridAggregateColumn>

            </GridAggregateColumns>

        </GridAggregate>

    </GridAggregates>



NP Naveen Palanivel Syncfusion Team April 10, 2023 08:44 PM UTC

Hi Mauri ,


We checked your query, we prepared sample with given code and export it. But report issue does not occurs at our end. Please refer the attached sample for your reference.


If the reported issue still reproduced then kindly share the below details to validate further at our end.


  1. Share us the entire Grid code snippet along with model class
  2. Share us the video demonstration of the issue in provided sample.
  3. If possible share us an simple issue reproduceable sample or try to modify the above mentioned sample.


The above-requested details will be very helpful for us to validate the reported query at our end and provide the solution as early as possible


Regards,

Naveen Palanivel


Attachment: Blazor_0410__Export_ed981847.zip

Loader.
Up arrow icon