OWC, C#, Pivot Tables, Code behind...

C

Claude Vernier

Hello,
I'm surfing for some time now and I'm a bit confused...
I already made a C# Winform application working with
ExcelXP where I generated Pivot tables based on the name
of the cube the user selected.

Now, I must convert to an ASPX application.
I saw several samples where XMLData is generated, also
saw a project using very large XML structures to fill the
OWC.

What I would like to do is drag and drop the OWC on my
ASPX page, having a related variable in my codebehind
and, setting properties in this codebehind, have nothing
else to do.
The information I have is the connection string and the
name of the cube.

What I've done already:

In HTML:
<OBJECT id=MyPivot name=MyPivot VIEWASTEXT></OBJECT>

In C#:
public class TestWebForm : System.Web.UI.Page
{
protected
Microsoft.Office.Interop.OWC.PivotTableClass MyPivot;

private void Page_Load(object sender,
System.EventArgs e)
{
MyPivot = new
Microsoft.Office.Interop.OWC.PivotTableClass();
}
}


Seems that the variable is initialized the right way, but
I'm not sure what to do next and not sure either if it
was ever meant to be done this way.
I've already installed: "Office XP Web Component
Toolpack" but haven't found any C# code.
I'd need some infos on how is .Net integrated with this.

I also saw some web sites where it is mentionned that I
should add the
attibute: "[System.Runtime.InteropServices.ClassInterface
(System.Runtime.InteropService
s.ClassInterfaceType.None)]" but I did not understand how
and where...

Thanks for any help... sorry for my poor english...
Claude Vernier
 
D

Dan Ricker

The code behind won't work.

OWC controls are ActiveX controls not "Web Controls" as
defined by ASP.NET/VS.NET.

ActiveX controls exist in one location, either the client
or the server but not both.

Dan
 
M

Matt

Here are some links that I've researched today but haven't been able
to get working. I think the answer is in here somewhere but for now my
compile is failing on the modification of the pia. Look for my post on
this subject soon.

'info on pias
'http://msdn.microsoft.com/library/default.asp?url=/downloads/list/office.asp
'pia install
'http://support.microsoft.com/default.aspx?scid=kb;EN-US;328912
'modifying the pia for use with vs 2003
'http://support.microsoft.com/default.aspx?scid=kb;EN-US;328275
'vb.net example
'http://support.microsoft.com/default.aspx?scid=kb;en-us;319557


Dan Ricker said:
The code behind won't work.

OWC controls are ActiveX controls not "Web Controls" as
defined by ASP.NET/VS.NET.

ActiveX controls exist in one location, either the client
or the server but not both.

Dan

-----Original Message-----
Hello,
I'm surfing for some time now and I'm a bit confused...
I already made a C# Winform application working with
ExcelXP where I generated Pivot tables based on the name
of the cube the user selected.

Now, I must convert to an ASPX application.
I saw several samples where XMLData is generated, also
saw a project using very large XML structures to fill the
OWC.

What I would like to do is drag and drop the OWC on my
ASPX page, having a related variable in my codebehind
and, setting properties in this codebehind, have nothing
else to do.
The information I have is the connection string and the
name of the cube.

What I've done already:

In HTML:
<OBJECT id=MyPivot name=MyPivot VIEWASTEXT></OBJECT>

In C#:
public class TestWebForm : System.Web.UI.Page
{
protected
Microsoft.Office.Interop.OWC.PivotTableClass MyPivot;

private void Page_Load(object sender,
System.EventArgs e)
{
MyPivot = new
Microsoft.Office.Interop.OWC.PivotTableClass();
}
}


Seems that the variable is initialized the right way, but
I'm not sure what to do next and not sure either if it
was ever meant to be done this way.
I've already installed: "Office XP Web Component
Toolpack" but haven't found any C# code.
I'd need some infos on how is .Net integrated with this.

I also saw some web sites where it is mentionned that I
should add the
attibute: "[System.Runtime.InteropServices.ClassInterface
(System.Runtime.InteropService
s.ClassInterfaceType.None)]" but I did not understand how
and where...

Thanks for any help... sorry for my poor english...
Claude Vernier

.
 
A

Alvin Bruney

you can't access the UI from code behind as Dan rightly pointed out but you
can script to it from code behind. I saw your earlier post and I am a little
confused as to what you are trying to do client side with the server side
PIA

Matt said:
Here are some links that I've researched today but haven't been able
to get working. I think the answer is in here somewhere but for now my
compile is failing on the modification of the pia. Look for my post on
this subject soon.

'info on pias
'http://msdn.microsoft.com/library/default.asp?url=/downloads/list/office.as
p
'pia install
'http://support.microsoft.com/default.aspx?scid=kb;EN-US;328912
'modifying the pia for use with vs 2003
'http://support.microsoft.com/default.aspx?scid=kb;EN-US;328275
'vb.net example
'http://support.microsoft.com/default.aspx?scid=kb;en-us;319557


"Dan Ricker" <[email protected]> wrote in message
The code behind won't work.

OWC controls are ActiveX controls not "Web Controls" as
defined by ASP.NET/VS.NET.

ActiveX controls exist in one location, either the client
or the server but not both.

Dan

-----Original Message-----
Hello,
I'm surfing for some time now and I'm a bit confused...
I already made a C# Winform application working with
ExcelXP where I generated Pivot tables based on the name
of the cube the user selected.

Now, I must convert to an ASPX application.
I saw several samples where XMLData is generated, also
saw a project using very large XML structures to fill the
OWC.

What I would like to do is drag and drop the OWC on my
ASPX page, having a related variable in my codebehind
and, setting properties in this codebehind, have nothing
else to do.
The information I have is the connection string and the
name of the cube.

What I've done already:

In HTML:
<OBJECT id=MyPivot name=MyPivot VIEWASTEXT></OBJECT>

In C#:
public class TestWebForm : System.Web.UI.Page
{
protected
Microsoft.Office.Interop.OWC.PivotTableClass MyPivot;

private void Page_Load(object sender,
System.EventArgs e)
{
MyPivot = new
Microsoft.Office.Interop.OWC.PivotTableClass();
}
}


Seems that the variable is initialized the right way, but
I'm not sure what to do next and not sure either if it
was ever meant to be done this way.
I've already installed: "Office XP Web Component
Toolpack" but haven't found any C# code.
I'd need some infos on how is .Net integrated with this.

I also saw some web sites where it is mentionned that I
should add the
attibute: "[System.Runtime.InteropServices.ClassInterface
(System.Runtime.InteropService
s.ClassInterfaceType.None)]" but I did not understand how
and where...

Thanks for any help... sorry for my poor english...
Claude Vernier

.
 
C

Claude Vernier

Thanks to all!!

I'm finally resigned to use javascript...
I've made a class based on the XSD form the XMLData
schema but there's a lot of attributes that I don 't
understand, can someone suggest me documentation/samples?

Also, I tried to make a script retrieving the names of
each buttons, hoping to remove some buttons based on
their names... But it doesn't work, can someone help?

<script language=JavaScript>
<!--
function BuildXMLData()
{
if( document.getElementById('OWCPivotTable') )
{
var oPivotTable = document.getElementById
('OWCPivotTable');

var iCount =
oPivotTable.Toolbar.Buttons.Count;
var sButtons = iCount;
var oBtn;

for( i=0 ; i<iCount ; i++ )
{
sButtons = sButtons + ', ';
oBtn = oPivotTable.Toolbar.buttons
;
/* oBtn is always NULL !!! */
if( oBtn )
sButtons = sButtons
+ 'yes';
else
sButtons = sButtons
+ 'no';
}
document.getElementById
('oTextArea').value = sButtons
}
}
//-->
</script>



Thanks!
Claude
 
M

Matt

I can't speak for the person who started this thread but my goal is to
use the code behind to feed data to the OWC and accept commands from
the user.

Currently, we have OWC's that we setup in FrontPage and then post them
on a web page. One of the problems with this is that all the code
which defines the control is locked into the OWC. The only way to
change it is to use Front Page.

Another issue is that the OWC's are very twitchy in ASP.Net. When I
put them on an ASPX page I have to be very careful about simple
formatting because VS will change the code and break the
functionality.

I thought a solution to this problem would be to just drag and drop
the OWC to an ASPX page and use code behind to control it's format,
data, and properties. This means I could add some options (radio
buttons, drop down lists) to my page and allow the user to tweak the
results.

I'm not sure why people say this is impossible since this article
http://support.microsoft.com/default.aspx?scid=kb;en-us;319557 seems
to imply that it can be done. Maybe I don't understand what you're
saying is impossible.

Alvin Bruney said:
you can't access the UI from code behind as Dan rightly pointed out but you
can script to it from code behind. I saw your earlier post and I am a little
confused as to what you are trying to do client side with the server side
PIA

Matt said:
Here are some links that I've researched today but haven't been able
to get working. I think the answer is in here somewhere but for now my
compile is failing on the modification of the pia. Look for my post on
this subject soon.

'info on pias
'http://msdn.microsoft.com/library/default.asp?url=/downloads/list/office.as
p
'pia install
'http://support.microsoft.com/default.aspx?scid=kb;EN-US;328912
'modifying the pia for use with vs 2003
'http://support.microsoft.com/default.aspx?scid=kb;EN-US;328275
'vb.net example
'http://support.microsoft.com/default.aspx?scid=kb;en-us;319557


"Dan Ricker" <[email protected]> wrote in message
The code behind won't work.

OWC controls are ActiveX controls not "Web Controls" as
defined by ASP.NET/VS.NET.

ActiveX controls exist in one location, either the client
or the server but not both.

Dan


-----Original Message-----
Hello,
I'm surfing for some time now and I'm a bit confused...
I already made a C# Winform application working with
ExcelXP where I generated Pivot tables based on the name
of the cube the user selected.

Now, I must convert to an ASPX application.
I saw several samples where XMLData is generated, also
saw a project using very large XML structures to fill the
OWC.

What I would like to do is drag and drop the OWC on my
ASPX page, having a related variable in my codebehind
and, setting properties in this codebehind, have nothing
else to do.
The information I have is the connection string and the
name of the cube.

What I've done already:

In HTML:
<OBJECT id=MyPivot name=MyPivot VIEWASTEXT></OBJECT>

In C#:
public class TestWebForm : System.Web.UI.Page
{
protected
Microsoft.Office.Interop.OWC.PivotTableClass MyPivot;

private void Page_Load(object sender,
System.EventArgs e)
{
MyPivot = new
Microsoft.Office.Interop.OWC.PivotTableClass();
}
}


Seems that the variable is initialized the right way, but
I'm not sure what to do next and not sure either if it
was ever meant to be done this way.
I've already installed: "Office XP Web Component
Toolpack" but haven't found any C# code.
I'd need some infos on how is .Net integrated with this.

I also saw some web sites where it is mentionned that I
should add the
attibute: "[System.Runtime.InteropServices.ClassInterface
(System.Runtime.InteropService
s.ClassInterfaceType.None)]" but I did not understand how
and where...

Thanks for any help... sorry for my poor english...
Claude Vernier

.
 
A

Alvin Bruney

Aren't you trying to build a webpage? OWC Objects prefixed with ax.... which
you are trying to use, only work with windows forms as pointed out in the
example in line 1
Create a new Visual Basic Windows Application project, and then name the
project ChartEvents

If your intention is to build a windows application with internet
connectivity, then go right ahead otherwise,
your only other option is to use the client-side active X control.

I don't understand what is meant by OWC being very twitchy.

You can target the OWC from codebehind but you will have to stream the
script out to the browser because the object does not expose a server side
handle since it runs on the client. You cannot say axSpreadsheet.anything

I would be happy to be more specific if you are still confused. It took me a
while to get this straight as well.

Matt said:
I can't speak for the person who started this thread but my goal is to
use the code behind to feed data to the OWC and accept commands from
the user.

Currently, we have OWC's that we setup in FrontPage and then post them
on a web page. One of the problems with this is that all the code
which defines the control is locked into the OWC. The only way to
change it is to use Front Page.

Another issue is that the OWC's are very twitchy in ASP.Net. When I
put them on an ASPX page I have to be very careful about simple
formatting because VS will change the code and break the
functionality.

I thought a solution to this problem would be to just drag and drop
the OWC to an ASPX page and use code behind to control it's format,
data, and properties. This means I could add some options (radio
buttons, drop down lists) to my page and allow the user to tweak the
results.

I'm not sure why people say this is impossible since this article
http://support.microsoft.com/default.aspx?scid=kb;en-us;319557 seems
to imply that it can be done. Maybe I don't understand what you're
saying is impossible.

"Alvin Bruney" <vapordan_spam_me_not@hotmail_no_spamhotmail.com> wrote in
message news: said:
you can't access the UI from code behind as Dan rightly pointed out but you
can script to it from code behind. I saw your earlier post and I am a little
confused as to what you are trying to do client side with the server side
PIA

Matt said:
Here are some links that I've researched today but haven't been able
to get working. I think the answer is in here somewhere but for now my
compile is failing on the modification of the pia. Look for my post on
this subject soon.

'info on pias
'http://msdn.microsoft.com/library/default.asp?url=/downloads/list/office.as
p
The code behind won't work.

OWC controls are ActiveX controls not "Web Controls" as
defined by ASP.NET/VS.NET.

ActiveX controls exist in one location, either the client
or the server but not both.

Dan


-----Original Message-----
Hello,
I'm surfing for some time now and I'm a bit confused...
I already made a C# Winform application working with
ExcelXP where I generated Pivot tables based on the name
of the cube the user selected.

Now, I must convert to an ASPX application.
I saw several samples where XMLData is generated, also
saw a project using very large XML structures to fill the
OWC.

What I would like to do is drag and drop the OWC on my
ASPX page, having a related variable in my codebehind
and, setting properties in this codebehind, have nothing
else to do.
The information I have is the connection string and the
name of the cube.

What I've done already:

In HTML:
<OBJECT id=MyPivot name=MyPivot VIEWASTEXT></OBJECT>

In C#:
public class TestWebForm : System.Web.UI.Page
{
protected
Microsoft.Office.Interop.OWC.PivotTableClass MyPivot;

private void Page_Load(object sender,
System.EventArgs e)
{
MyPivot = new
Microsoft.Office.Interop.OWC.PivotTableClass();
}
}


Seems that the variable is initialized the right way, but
I'm not sure what to do next and not sure either if it
was ever meant to be done this way.
I've already installed: "Office XP Web Component
Toolpack" but haven't found any C# code.
I'd need some infos on how is .Net integrated with this.

I also saw some web sites where it is mentionned that I
should add the
attibute: "[System.Runtime.InteropServices.ClassInterface
(System.Runtime.InteropService
s.ClassInterfaceType.None)]" but I did not understand how
and where...

Thanks for any help... sorry for my poor english...
Claude Vernier

.
 
A

Alvin Bruney

what you need is this:

set a pointer to the toolbar object
set toolbar = document.all.opivot.Toolbar

set a pointer to the buttons object of the toolbar object adding a button at
the same time
set buttonView = toolbar.Buttons.Add(2,"cmdName","",0,2

use buttonview for that newly added button
buttonView.TooltipText = "some stuff"

i've a website coming out pretty soon which will provide indepth walkthrus
for the OWC.

Claude Vernier said:
Thanks to all!!

I'm finally resigned to use javascript...
I've made a class based on the XSD form the XMLData
schema but there's a lot of attributes that I don 't
understand, can someone suggest me documentation/samples?

Also, I tried to make a script retrieving the names of
each buttons, hoping to remove some buttons based on
their names... But it doesn't work, can someone help?

<script language=JavaScript>
<!--
function BuildXMLData()
{
if( document.getElementById('OWCPivotTable') )
{
var oPivotTable = document.getElementById
('OWCPivotTable');

var iCount =
oPivotTable.Toolbar.Buttons.Count;
var sButtons = iCount;
var oBtn;

for( i=0 ; i<iCount ; i++ )
{
sButtons = sButtons + ', ';
oBtn = oPivotTable.Toolbar.buttons
;
/* oBtn is always NULL !!! */
if( oBtn )
sButtons = sButtons
+ 'yes';
else
sButtons = sButtons
+ 'no';
}
document.getElementById
('oTextArea').value = sButtons
}
}
//-->
</script>



Thanks!
Claude
-----Original Message-----
Hello,
I'm surfing for some time now and I'm a bit confused...
I already made a C# Winform application working with
ExcelXP where I generated Pivot tables based on the name
of the cube the user selected.

Now, I must convert to an ASPX application.
I saw several samples where XMLData is generated, also
saw a project using very large XML structures to fill the
OWC.

What I would like to do is drag and drop the OWC on my
ASPX page, having a related variable in my codebehind
and, setting properties in this codebehind, have nothing
else to do.
The information I have is the connection string and the
name of the cube.

What I've done already:

In HTML:
<OBJECT id=MyPivot name=MyPivot VIEWASTEXT></OBJECT>

In C#:
public class TestWebForm : System.Web.UI.Page
{
protected
Microsoft.Office.Interop.OWC.PivotTableClass MyPivot;

private void Page_Load(object sender,
System.EventArgs e)
{
MyPivot = new
Microsoft.Office.Interop.OWC.PivotTableClass();
}
}


Seems that the variable is initialized the right way, but
I'm not sure what to do next and not sure either if it
was ever meant to be done this way.
I've already installed: "Office XP Web Component
Toolpack" but haven't found any C# code.
I'd need some infos on how is .Net integrated with this.

I also saw some web sites where it is mentionned that I
should add the
attibute: "[System.Runtime.InteropServices.ClassInterface
(System.Runtime.InteropService
s.ClassInterfaceType.None)]" but I did not understand how
and where...

Thanks for any help... sorry for my poor english...
Claude Vernier

.
 
A

Alvin Bruney

what you need is this:

set a pointer to the toolbar object
set toolbar = document.all.opivot.Toolbar

set a pointer to the buttons object of the toolbar object adding a button at
the same time
set buttonView = toolbar.Buttons.Add(2,"cmdName","",0,2

use buttonview for that newly added button
buttonView.TooltipText = "some stuff"

Claude Vernier said:
Thanks to all!!

I'm finally resigned to use javascript...
I've made a class based on the XSD form the XMLData
schema but there's a lot of attributes that I don 't
understand, can someone suggest me documentation/samples?

Also, I tried to make a script retrieving the names of
each buttons, hoping to remove some buttons based on
their names... But it doesn't work, can someone help?

<script language=JavaScript>
<!--
function BuildXMLData()
{
if( document.getElementById('OWCPivotTable') )
{
var oPivotTable = document.getElementById
('OWCPivotTable');

var iCount =
oPivotTable.Toolbar.Buttons.Count;
var sButtons = iCount;
var oBtn;

for( i=0 ; i<iCount ; i++ )
{
sButtons = sButtons + ', ';
oBtn = oPivotTable.Toolbar.buttons
;
/* oBtn is always NULL !!! */
if( oBtn )
sButtons = sButtons
+ 'yes';
else
sButtons = sButtons
+ 'no';
}
document.getElementById
('oTextArea').value = sButtons
}
}
//-->
</script>



Thanks!
Claude
-----Original Message-----
Hello,
I'm surfing for some time now and I'm a bit confused...
I already made a C# Winform application working with
ExcelXP where I generated Pivot tables based on the name
of the cube the user selected.

Now, I must convert to an ASPX application.
I saw several samples where XMLData is generated, also
saw a project using very large XML structures to fill the
OWC.

What I would like to do is drag and drop the OWC on my
ASPX page, having a related variable in my codebehind
and, setting properties in this codebehind, have nothing
else to do.
The information I have is the connection string and the
name of the cube.

What I've done already:

In HTML:
<OBJECT id=MyPivot name=MyPivot VIEWASTEXT></OBJECT>

In C#:
public class TestWebForm : System.Web.UI.Page
{
protected
Microsoft.Office.Interop.OWC.PivotTableClass MyPivot;

private void Page_Load(object sender,
System.EventArgs e)
{
MyPivot = new
Microsoft.Office.Interop.OWC.PivotTableClass();
}
}


Seems that the variable is initialized the right way, but
I'm not sure what to do next and not sure either if it
was ever meant to be done this way.
I've already installed: "Office XP Web Component
Toolpack" but haven't found any C# code.
I'd need some infos on how is .Net integrated with this.

I also saw some web sites where it is mentionned that I
should add the
attibute: "[System.Runtime.InteropServices.ClassInterface
(System.Runtime.InteropService
s.ClassInterfaceType.None)]" but I did not understand how
and where...

Thanks for any help... sorry for my poor english...
Claude Vernier

.
 
C

Claude Vernier

Thank you very much!!
I'd sure like to visit such a web site...

But what about retrieving infos on currently existing
buttons?? Any ideas??

Thanks again!
Claude
-----Original Message-----
what you need is this:

set a pointer to the toolbar object
set toolbar = document.all.opivot.Toolbar

set a pointer to the buttons object of the toolbar object adding a button at
the same time
set buttonView = toolbar.Buttons.Add(2,"cmdName","",0,2

use buttonview for that newly added button
buttonView.TooltipText = "some stuff"

i've a website coming out pretty soon which will provide indepth walkthrus
for the OWC.

Thanks to all!!

I'm finally resigned to use javascript...
I've made a class based on the XSD form the XMLData
schema but there's a lot of attributes that I don 't
understand, can someone suggest me documentation/samples?

Also, I tried to make a script retrieving the names of
each buttons, hoping to remove some buttons based on
their names... But it doesn't work, can someone help?

<script language=JavaScript>
<!--
function BuildXMLData()
{
if( document.getElementById('OWCPivotTable') )
{
var oPivotTable = document.getElementById
('OWCPivotTable');

var iCount =
oPivotTable.Toolbar.Buttons.Count;
var sButtons = iCount;
var oBtn;

for( i=0 ; i<iCount ; i++ )
{
sButtons = sButtons + ', ';
oBtn = oPivotTable.Toolbar.buttons
;
/* oBtn is always NULL !!! */
if( oBtn )
sButtons = sButtons
+ 'yes';
else
sButtons = sButtons
+ 'no';
}
document.getElementById
('oTextArea').value = sButtons
}
}
//-->
</script>



Thanks!
Claude
-----Original Message-----
Hello,
I'm surfing for some time now and I'm a bit confused...
I already made a C# Winform application working with
ExcelXP where I generated Pivot tables based on the name
of the cube the user selected.

Now, I must convert to an ASPX application.
I saw several samples where XMLData is generated, also
saw a project using very large XML structures to fill the
OWC.

What I would like to do is drag and drop the OWC on my
ASPX page, having a related variable in my codebehind
and, setting properties in this codebehind, have nothing
else to do.
The information I have is the connection string and the
name of the cube.

What I've done already:

In HTML:
<OBJECT id=MyPivot name=MyPivot VIEWASTEXT></OBJECT>

In C#:
public class TestWebForm : System.Web.UI.Page
{
protected
Microsoft.Office.Interop.OWC.PivotTableClass MyPivot;

private void Page_Load(object sender,
System.EventArgs e)
{
MyPivot = new
Microsoft.Office.Interop.OWC.PivotTableClass();
}
}


Seems that the variable is initialized the right way, but
I'm not sure what to do next and not sure either if it
was ever meant to be done this way.
I've already installed: "Office XP Web Component
Toolpack" but haven't found any C# code.
I'd need some infos on how is .Net integrated with this.

I also saw some web sites where it is mentionned that I
should add the

attibute: "[System.Runtime.InteropServices.ClassInterface
(System.Runtime.InteropService
s.ClassInterfaceType.None)]" but I did not understand how
and where...

Thanks for any help... sorry for my poor english...
Claude Vernier

.


.
 
M

Matt

D'oh. Now that I look at the sample with ax... it is for a Windows
Form and not a web page. That explains a lot. What a huge goof on my
part.

With regards to it being twitchy, here's my post that remains
unanswered.
http://groups.google.com/[email protected]

There is an easy way to see the strange behavior. Develop a simple OWC
in FrontPage or whatever and copy onto a web form in VS. Save the web
form and add it to SourceSafe. If you don't have SourceSafe, just make
sure you save it and watch the indicator in VS that tells you when a
file is changed. Now switch between HTML and Design view and you
should see that VS changes the document. If it's in SourceSafe you
will get a message asking you to check it out. If it's not, you will
see the indicator showing the file changed. Remember, you didn't touch
the page at all and something triggered VS to modify your code. Now
try to do some simple edits like move text around and the OWC will
quickly become unstable.

However, if you get the OWC working on a web page, and you save it and
never even open it in VS again, it should work fine.
 
A

Alvin Bruney

you are prevented from tampering with these intalled buttons,

but the hack around it is,

use the code to point to the particular button and delete it. then re-add it
back to the original position with your changes. You may have to wire up the
events again. That's a hack though, i would recommend that you not tamper
with it. If you are trying to remove buttons, use the index property to do
so, i don't think (may be wrong) that it allows for removal by name - only
position.

regards
Claude Vernier said:
Thank you very much!!
I'd sure like to visit such a web site...

But what about retrieving infos on currently existing
buttons?? Any ideas??

Thanks again!
Claude
-----Original Message-----
what you need is this:

set a pointer to the toolbar object
set toolbar = document.all.opivot.Toolbar

set a pointer to the buttons object of the toolbar object adding a button at
the same time
set buttonView = toolbar.Buttons.Add(2,"cmdName","",0,2

use buttonview for that newly added button
buttonView.TooltipText = "some stuff"

i've a website coming out pretty soon which will provide indepth walkthrus
for the OWC.

Thanks to all!!

I'm finally resigned to use javascript...
I've made a class based on the XSD form the XMLData
schema but there's a lot of attributes that I don 't
understand, can someone suggest me documentation/samples?

Also, I tried to make a script retrieving the names of
each buttons, hoping to remove some buttons based on
their names... But it doesn't work, can someone help?

<script language=JavaScript>
<!--
function BuildXMLData()
{
if( document.getElementById('OWCPivotTable') )
{
var oPivotTable = document.getElementById
('OWCPivotTable');

var iCount =
oPivotTable.Toolbar.Buttons.Count;
var sButtons = iCount;
var oBtn;

for( i=0 ; i<iCount ; i++ )
{
sButtons = sButtons + ', ';
oBtn = oPivotTable.Toolbar.buttons
;
/* oBtn is always NULL !!! */
if( oBtn )
sButtons = sButtons
+ 'yes';
else
sButtons = sButtons
+ 'no';
}
document.getElementById
('oTextArea').value = sButtons
}
}
//-->
</script>



Thanks!
Claude

-----Original Message-----
Hello,
I'm surfing for some time now and I'm a bit confused...
I already made a C# Winform application working with
ExcelXP where I generated Pivot tables based on the name
of the cube the user selected.

Now, I must convert to an ASPX application.
I saw several samples where XMLData is generated, also
saw a project using very large XML structures to fill
the
OWC.

What I would like to do is drag and drop the OWC on my
ASPX page, having a related variable in my codebehind
and, setting properties in this codebehind, have nothing
else to do.
The information I have is the connection string and the
name of the cube.

What I've done already:

In HTML:
<OBJECT id=MyPivot name=MyPivot VIEWASTEXT></OBJECT>

In C#:
public class TestWebForm : System.Web.UI.Page
{
protected
Microsoft.Office.Interop.OWC.PivotTableClass MyPivot;

private void Page_Load(object sender,
System.EventArgs e)
{
MyPivot = new
Microsoft.Office.Interop.OWC.PivotTableClass();
}
}


Seems that the variable is initialized the right way,
but
I'm not sure what to do next and not sure either if it
was ever meant to be done this way.
I've already installed: "Office XP Web Component
Toolpack" but haven't found any C# code.
I'd need some infos on how is .Net integrated with this.

I also saw some web sites where it is mentionned that I
should add the

attibute: "[System.Runtime.InteropServices.ClassInterface
(System.Runtime.InteropService
s.ClassInterfaceType.None)]" but I did not understand
how
and where...

Thanks for any help... sorry for my poor english...
Claude Vernier

.


.
 
A

Alvin Bruney

I do recall a patch for visual source that fixed similar annoyances a few
months ago (7 -9 months). Please look at msdn to find such a service pack
for visual source safe. I believe the bug is in the VSS implementation and
not in .NET studio.

regards
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top