View Full Version : This looks like it should load the XML data for a Pivot Table


Douglas Osborne
05-31-2006, 10:10 PM
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;
}
}

Alvin Bruney
06-01-2006, 05:41 PM
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
news:uNsnkaPhGHA.3588@TK2MSFTNGP02.phx.gbl...
>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;
> }
> }
>
>
>

Douglas Osborne
06-01-2006, 07:07 PM
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" <www.lulu.com/owc> wrote in message
news:u1scFpZhGHA.4368@TK2MSFTNGP03.phx.gbl...
> 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
> news:uNsnkaPhGHA.3588@TK2MSFTNGP02.phx.gbl...
>>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;
>> }
>> }
>>
>>
>>
>
>

Alvin Bruney
06-01-2006, 09:20 PM
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" <dougdotosborneatcardionetdotcom> wrote in message
news:uCoC7YahGHA.3756@TK2MSFTNGP02.phx.gbl...
> 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" <www.lulu.com/owc> wrote in message
> news:u1scFpZhGHA.4368@TK2MSFTNGP03.phx.gbl...
>> 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
>> news:uNsnkaPhGHA.3588@TK2MSFTNGP02.phx.gbl...
>>>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;
>>> }
>>> }
>>>
>>>
>>>
>>
>>
>
>

Douglas Osborne
06-02-2006, 03:20 PM
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" <www.lulu.com/owc> wrote in message
news:exPVajbhGHA.4080@TK2MSFTNGP03.phx.gbl...
> 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" <dougdotosborneatcardionetdotcom> wrote in message
> news:uCoC7YahGHA.3756@TK2MSFTNGP02.phx.gbl...
>> 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" <www.lulu.com/owc> wrote in message
>> news:u1scFpZhGHA.4368@TK2MSFTNGP03.phx.gbl...
>>> 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
>>> news:uNsnkaPhGHA.3588@TK2MSFTNGP02.phx.gbl...
>>>>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;
>>>> }
>>>> }
>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>