Pivotgridcontrol export to pdf without UI

Hi,

I wish to export my data as a pivotgrid without using UI. How to achieve this.?
I tried but when i export pdf, i get an empty sheet.
PivotGridControl = new PivotGridControl{ItemSource = Results, VisualStyle = PivotGridVisualStyle.Metro};

            PivotGridControl.PivotCalculations.Add(new PivotComputationInfo() { FieldHeader = "TotalPnL", FieldName = "TotalPnL", Format = "C0", SummaryType = SummaryType.DecimalTotalSum });
            PivotGridControl.LoadInBackground = false;
            PivotGridControl.PivotEngine.EnableOnDemandCalculations = false;
            PivotGridControl.PivotRows.Add(new PivotItem() { FieldMappingName = "SubCluster", FieldHeader = "SubCluster" });
PivotGridControl.Refresh();

Now, if i export as excel, i get an exception. How to do this without binding to an UI Control.?



3 Replies

TB Thirupathi Bala Krishnan Syncfusion Team November 30, 2017 12:18 PM UTC

Hi Chaitanya, 

The reported scenario – “Exception was thrown when exporting PivotGrid into Excel and PDF document” is entirely new from our default perspective and we are unable to get the information about the line where “Export()” function is called. Hence we are not able to find the exact root cause for this issue.  

Kindly share us your working sample reproducing the reported issue, so that it would be helpful for us to provide a solution at the earliest. 

Regards, 
Thirupathi B. 
 



CH chaitanya December 5, 2017 02:23 PM UTC

Here attached is the sample project.

How do i export the data as a pivot without using xaml attachments.?

Attachment: Attribution.Test.PivotGrid_97698d6b.zip


TB Thirupathi Bala Krishnan Syncfusion Team December 6, 2017 11:40 AM UTC

Hi Chaitanya, 

We could reproduce the reported issue at our end. Meanwhile a support incident has been created under your account and we request you to login into our Direct Trac system for further updates on this issue. Our Direct Trac support system can be accessed from the following link: 

Regards, 
Thirupathi B. 


Loader.
Up arrow icon