Problem with Aggregated Columns exported to excel
Hi Im getting an error when using an aggragate and exporting it to excel
This is what I get from the OnActionFailed event:
I've attached an example, the Grid is on the counter.razor page
If I delete the aggregate from the grid, it works fine
Attachment: BlazorGridGroupExample_aeb32c09.7z
Hi Daniel,
We have confirmed this as an issue and logged the defect report “Error
Throwing When Exporting Excel with GroupFooterTemplate Aggregate” for the
same and this fix will be included in our upcoming patch release which is
expected to be rolled out in our upcoming patch release .
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.
https://www.syncfusion.com/feedback/58239/error-throwing-when-exporting-excel-with-groupfootertemplate-aggregate
We will get back to you once the release is rolled out. Until then we
appreciate your patience.
Regards,
Prathap Senthil
Hi Daniel,
Thanks for the patience,
Regarding the reported issue of Error Throwing When Exporting Excel with
GroupFooterTemplate Aggregate, the problem arises because the current Read
method only returns the grouping results, excluding aggregate changes. Please
refer to the modified code snippet below for clarification
|
ServiceDataAdaptorComponent.razor.cs { DataResult.Aggregates = DataUtil.PerformAggregation(DataResult.Result, dm.Aggregates); }
if (dm.Group != null && !dm.ServerSideGroup) { IEnumerable GroupData = Enumerable.Empty<object>(); foreach (var group in dm.Group) { var groupData = DataUtil.Group<TModel>(DataResult.Result, group, dm.Aggregates, 0, dm.GroupByFormatter); DataResult.Result = groupData;
}
return dm.RequiresCounts ? DataResult : (object)DataResult.Result; }
|
While working on this issue, we noticed that Excel Export generates empty
cells on the Excel sheet when the grid has template columns. We are pleased
to announce that we have included a fix for this in our 26.1.39 release. Please
upgrade to the latest version of our Syncfusion NuGet package to resolve the
reported issue. You can find the NuGet package for the latest fixes and
features below
NuGet : https://www.nuget.org/packages/Syncfusion.Blazor.Grid
Root cause : While calculating the hidden column count we have
ensured that the column template should equal to null, since the column
template is not null on this case the hidden column count is 0. (After grouping
it should have returned 1 on working case)
Action
Taken: I
have removed the condition that the column template == null so that it
satisfied and fixes the above faced issue.
We thank you for your support and appreciate your patience in waiting for this
release.
Regards,
Prathap Senthil
Attachment: BlazorGridGroupExample_2fcc650f.zip
- 2 Replies
- 2 Participants
-
DA Daniel
- May 28, 2024 01:44 PM UTC
- Jun 25, 2024 07:23 AM UTC