P
Peter Holpar
Hello,
I buid the XML data for a PivotTable using a DataSet transformation for XML
in an ASP.NET page (pivotdata.aspx).
In a separate ASP.NET page I try to build a PivotTable and use its XMLData
to specify the PivotTable properties for the client side (I prefer not to
use client-side scripts).
I've tried this code:
PivotTableClass Table = new PivotTableClass();
WC10.PivotView View;
Table.AutoFit = true;
Table.ConnectionString = "provider=mspersist";
Table.CommandText = @"http://myserver/myapp/pivotdata.aspx";
// this line causes an exception
"System.Runtime.InteropServices.COMException: Unspecified error"
PivotFieldSet Customer = View.FieldSets["Customer"];
Customer.Fields[0].Caption = "Customer";
View.RowAxis.InsertFieldSet(Customer, null, false);
The XML data seems to not be loaded from the pivotdata.aspx ASP.NET page,
and View.FieldSets collection is not available at all.
The same piece of code work when I use it in a Windows Forms application.
If I use
Table.CommandText = @"C:\myapp\pivotdata.xml";
in the ASP.NET page it also works (if the browser and the website are on the
same machine).
Could you help me, please?
Peter
I buid the XML data for a PivotTable using a DataSet transformation for XML
in an ASP.NET page (pivotdata.aspx).
In a separate ASP.NET page I try to build a PivotTable and use its XMLData
to specify the PivotTable properties for the client side (I prefer not to
use client-side scripts).
I've tried this code:
PivotTableClass Table = new PivotTableClass();
WC10.PivotView View;
Table.AutoFit = true;
Table.ConnectionString = "provider=mspersist";
Table.CommandText = @"http://myserver/myapp/pivotdata.aspx";
// this line causes an exception
"System.Runtime.InteropServices.COMException: Unspecified error"
PivotFieldSet Customer = View.FieldSets["Customer"];
Customer.Fields[0].Caption = "Customer";
View.RowAxis.InsertFieldSet(Customer, null, false);
The XML data seems to not be loaded from the pivotdata.aspx ASP.NET page,
and View.FieldSets collection is not available at all.
The same piece of code work when I use it in a Windows Forms application.
If I use
Table.CommandText = @"C:\myapp\pivotdata.xml";
in the ASP.NET page it also works (if the browser and the website are on the
same machine).
Could you help me, please?
Peter