This looks like it should load the XML data for a Pivot Table

D

Douglas Osborne

I have the code below, which runs, however I do not have an active view
after I load the command text with the name of the xml file.

What command might I be missing?

TIA,
Doug

public OWC11.PivotTable pt2;
public OWC11.PivotView pv2;
public OWC11.PivotFieldSets ps2;

private void Page_Load(object sender, System.EventArgs e)
{
try
{
// Create a new PivotTable
pt2 = new OWC11.PivotTableClass();

// Not sure
pt2.AutoFit = true;

// Set data to load
pt2.CommandText = "C:\\APPLICATIONS\\ExcelPivot\\PatientSummary.xml";

// Problem is here - no active view - what else needs to be set?
pv2 = pt2.ActiveView;

// Clear the labels
pv2.FilterAxis.Label.Visible = false;
pv2.RowAxis.Label.Visible = false;
pv2.ColumnAxis.Label.Visible = false;
pv2.TitleBar.Visible = false;

// Get variables from the pivot table
pv2 = pt2.ActiveView;

ps2 = pt2.ActiveView.FieldSets;

// Add Category to the Row axis
pv2.RowAxis.InsertFieldSet ps2["PracticeName"];
}
catch( Exception Ex )
{
string Error = Ex.Message;
}
}
 
D

Douglas Osborne

Is this for the source code email I have sent you twice or for responding
here?

The one here works if you translate it - doug dot osborne at cardionet dot
com

or
DouglasOsborne
at
DouglasOsborne
..
com

Doug
Alvin Bruney said:
Douglas:
Can you supply another email address? The one you supplied keeps failing.

--

________________________
Warm regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
Professional VSTO.NET - Wrox/Wiley
The O.W.C. Black Book with .NET
www.lulu.com/owc, Amazon
Blog: http://www.msmvps.com/blogs/alvin
-------------------------------------------------------

Douglas Osborne said:
I have the code below, which runs, however I do not have an active view
after I load the command text with the name of the xml file.

What command might I be missing?

TIA,
Doug

public OWC11.PivotTable pt2;
public OWC11.PivotView pv2;
public OWC11.PivotFieldSets ps2;

private void Page_Load(object sender, System.EventArgs e)
{
try
{
// Create a new PivotTable
pt2 = new OWC11.PivotTableClass();

// Not sure
pt2.AutoFit = true;

// Set data to load
pt2.CommandText = "C:\\APPLICATIONS\\ExcelPivot\\PatientSummary.xml";

// Problem is here - no active view - what else needs to be set?
pv2 = pt2.ActiveView;

// Clear the labels
pv2.FilterAxis.Label.Visible = false;
pv2.RowAxis.Label.Visible = false;
pv2.ColumnAxis.Label.Visible = false;
pv2.TitleBar.Visible = false;

// Get variables from the pivot table
pv2 = pt2.ActiveView;

ps2 = pt2.ActiveView.FieldSets;

// Add Category to the Row axis
pv2.RowAxis.InsertFieldSet ps2["PracticeName"];
}
catch( Exception Ex )
{
string Error = Ex.Message;
}
}
 
A

Alvin Bruney

these two emails failed. I'm out of ideas/options. I can recieve your
emails, however, you can't recieve mine - either attachments or plain
emails.

--

________________________
Warm regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
Professional VSTO.NET - Wrox/Wiley
The O.W.C. Black Book with .NET
www.lulu.com/owc, Amazon
Blog: http://www.msmvps.com/blogs/alvin
-------------------------------------------------------

Douglas Osborne said:
Is this for the source code email I have sent you twice or for responding
here?

The one here works if you translate it - doug dot osborne at cardionet dot
com

or
DouglasOsborne
at
DouglasOsborne
.
com

Doug
Alvin Bruney said:
Douglas:
Can you supply another email address? The one you supplied keeps failing.

--

________________________
Warm regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
Professional VSTO.NET - Wrox/Wiley
The O.W.C. Black Book with .NET
www.lulu.com/owc, Amazon
Blog: http://www.msmvps.com/blogs/alvin
-------------------------------------------------------

Douglas Osborne said:
I have the code below, which runs, however I do not have an active view
after I load the command text with the name of the xml file.

What command might I be missing?

TIA,
Doug

public OWC11.PivotTable pt2;
public OWC11.PivotView pv2;
public OWC11.PivotFieldSets ps2;

private void Page_Load(object sender, System.EventArgs e)
{
try
{
// Create a new PivotTable
pt2 = new OWC11.PivotTableClass();

// Not sure
pt2.AutoFit = true;

// Set data to load
pt2.CommandText = "C:\\APPLICATIONS\\ExcelPivot\\PatientSummary.xml";

// Problem is here - no active view - what else needs to be set?
pv2 = pt2.ActiveView;

// Clear the labels
pv2.FilterAxis.Label.Visible = false;
pv2.RowAxis.Label.Visible = false;
pv2.ColumnAxis.Label.Visible = false;
pv2.TitleBar.Visible = false;

// Get variables from the pivot table
pv2 = pt2.ActiveView;

ps2 = pt2.ActiveView.FieldSets;

// Add Category to the Row axis
pv2.RowAxis.InsertFieldSet ps2["PracticeName"];
}
catch( Exception Ex )
{
string Error = Ex.Message;
}
}
 
D

Douglas Osborne

How about

IAmOzTGAT

at

Hotmail

dot

com

I get about 50 spams a day - what error does it give you? Is your email
blacklisted?

Best, sorry for the trouble,
Doug

Alvin Bruney said:
these two emails failed. I'm out of ideas/options. I can recieve your
emails, however, you can't recieve mine - either attachments or plain
emails.

--

________________________
Warm regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
Professional VSTO.NET - Wrox/Wiley
The O.W.C. Black Book with .NET
www.lulu.com/owc, Amazon
Blog: http://www.msmvps.com/blogs/alvin
-------------------------------------------------------

Douglas Osborne said:
Is this for the source code email I have sent you twice or for responding
here?

The one here works if you translate it - doug dot osborne at cardionet
dot com

or
DouglasOsborne
at
DouglasOsborne
.
com

Doug
Alvin Bruney said:
Douglas:
Can you supply another email address? The one you supplied keeps
failing.

--

________________________
Warm regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
Professional VSTO.NET - Wrox/Wiley
The O.W.C. Black Book with .NET
www.lulu.com/owc, Amazon
Blog: http://www.msmvps.com/blogs/alvin
-------------------------------------------------------

"Douglas Osborne" <dougdotosborneatcardionetdotcom> wrote in message
I have the code below, which runs, however I do not have an active view
after I load the command text with the name of the xml file.

What command might I be missing?

TIA,
Doug

public OWC11.PivotTable pt2;
public OWC11.PivotView pv2;
public OWC11.PivotFieldSets ps2;

private void Page_Load(object sender, System.EventArgs e)
{
try
{
// Create a new PivotTable
pt2 = new OWC11.PivotTableClass();

// Not sure
pt2.AutoFit = true;

// Set data to load
pt2.CommandText =
"C:\\APPLICATIONS\\ExcelPivot\\PatientSummary.xml";

// Problem is here - no active view - what else needs to be set?
pv2 = pt2.ActiveView;

// Clear the labels
pv2.FilterAxis.Label.Visible = false;
pv2.RowAxis.Label.Visible = false;
pv2.ColumnAxis.Label.Visible = false;
pv2.TitleBar.Visible = false;

// Get variables from the pivot table
pv2 = pt2.ActiveView;

ps2 = pt2.ActiveView.FieldSets;

// Add Category to the Row axis
pv2.RowAxis.InsertFieldSet ps2["PracticeName"];
}
catch( Exception Ex )
{
string Error = Ex.Message;
}
}
 
Top