- Home
- Forum
- Angular - EJ 2
- Error when exporting grid to PDF
Error when exporting grid to PDF
Good Afternoon.
When I'm exporting the grid to PDF and my grid having footer aggregates, in the exporting PDF aggregates are not showing.
Another problem is that after exporting to PDF, in the rendered grid and the last two footers totals are showing multiple times.
Thank you.
Attachment: testej2_b18224e.7z
SIGN IN To post a reply.
5 Replies
HJ
Hariharan J V
Syncfusion Team
May 14, 2019 11:55 AM UTC
Hi Isaias,
Thanks for contacting Syncfusion support.
We have validated the reported problem and we found the angular Ng-template have some technical limitation while compiling Ng-template so we suggest you to render the aggregates in type script way to overcome the reported problem.
Please refer the following code example and modified sample for more information.
|
<ejs-grid #grid [dataSource]='data' [allowPdfExport]='true' [aggregates]='aggregates'[toolbar]='toolbar' (toolbarClick)='toolbarClick($event)'
[allowResizing]="true" [allowGrouping]="true" [groupSettings]="groupOptions">
<e-columns>
. . . .
<e-column field='Freight' headerText='Freight' type='number' width='120' format='C2' [enableGroupByFormat]='true'></e-column>
</e-columns>
</ejs-grid> |
|
this.aggregates = [{
columns: [{
type: 'Sum',
field: 'Freight',
format: 'C2',
groupFooterTemplate: '<b><font color="blue">Tot:${Sum}</font></b>'
}]
},
{
columns: [{
type: 'Sum',
field: 'Freight',
format: 'C2',
footerTemplate: '<b><font color="blue">Gen.Tot:${Sum}</font></b>'
}]
}];
}
|
Regards,
Hariharan
IC
Isaias Chalvatzoglou
May 14, 2019 12:53 PM UTC
Hi Hariharan,
Problem solved
Thank you
HJ
Hariharan J V
Syncfusion Team
May 15, 2019 07:05 AM UTC
Hi Isaias,
Thanks for your update.
We are happy to hear that your requirement has been resolved.
Regards,
Hariharan
Thanks for your update.
We are happy to hear that your requirement has been resolved.
Regards,
Hariharan
Hi Isaias,Thanks for contacting Syncfusion support.We have validated the reported problem and we found the angular Ng-template have some technical limitation while compiling Ng-template so we suggest you to render the aggregates in type script way to overcome the reported problem.Please refer the following code example and modified sample for more information.
<ejs-grid #grid [dataSource]='data' [allowPdfExport]='true' [aggregates]='aggregates'[toolbar]='toolbar' (toolbarClick)='toolbarClick($event)'[allowResizing]="true" [allowGrouping]="true" [groupSettings]="groupOptions"><e-columns>. . . .<e-column field='Freight' headerText='Freight' type='number' width='120' format='C2' [enableGroupByFormat]='true'></e-column></e-columns></ejs-grid>
this.aggregates = [{columns: [{type: 'Sum',field: 'Freight',format: 'C2',groupFooterTemplate: '<b><font color="blue">Tot:${Sum}</font></b>'}]},{columns: [{type: 'Sum',field: 'Freight',format: 'C2',footerTemplate: '<b><font color="blue">Gen.Tot:${Sum}</font></b>'}]}];}Regards,Hariharan
Hi Hariharan,
Is there any updates regarding this solution by using ng-template in footer or I will use this solution?
BS
Balaji Sekar
Syncfusion Team
November 30, 2020 12:28 PM UTC
Hi Babar Ali,
Currently we do not have support for render the Aggregate feature through Ng-template so we suggest you to render Aggregate feature using type script way
Regards,
Balaji Sekar
SIGN IN To post a reply.
- 5 Replies
- 4 Participants
-
IC Isaias Chalvatzoglou
- May 13, 2019 12:57 PM UTC
- Nov 30, 2020 12:28 PM UTC