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>
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.
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