Plenty of questions, please help me...

C

Claude Vernier

Hello,

Thanks to Mister Bruney, I achieve my C# Web page with an
OWC, undo feature with a custom button inside the
toolbar, here's some of my code:

var oPivotTable = document.getElementById
('OWCPivotTable');

oPivotTable.Toolbar.Buttons.Remove(1);
oPivotTable.Toolbar.Buttons.Remove(1);
oPivotTable.Toolbar.Buttons.Remove(2);
oPivotTable.Toolbar.Buttons.Remove(3);

var oNewButton;
var iBtnCount = oPivotTable.Toolbar.Buttons.Count;

// Add a button with arguments:Buttons.Add
( Index, Key, Caption, Style,
Image );

oNewButton = oPivotTable.Toolbar.Buttons.add(
iBtnCount++, "ViewChart", "", 0, 31 );
oNewButton.ToolTipText = "Toggle Chart / Pivot
Table";
oNewButton = oPivotTable.Toolbar.Buttons.add(
iBtnCount++, "SwapRowsCols", "", 0, 26 );
oNewButton.ToolTipText = "Toggle Rows / Columns";
oNewButton = oPivotTable.Toolbar.Buttons.add(
iBtnCount++, "Undo", "", 0, 1 );
oNewButton.ToolTipText = "Undo";
oNewButton = oPivotTable.Toolbar.Buttons.add(
iBtnCount++, "Separator", "", 3, 0 );

//To Show the all the button pictures...
// Style 0 = ?
// Style 1 = ?
// Style 2 = ?
// Style 3 = Separator
// Style 4 = Separator
// Style 5 = List
//for( var i=1 ; i<=31 ; i++ )
// oNewButton =
oPivotTable.Toolbar.Buttons.add(
iBtnCount++, "Test"+i, "Test"+i, 0, i );

My problems are as follows:
-I assign a value to the ToolTipText property but
it never shows.
-I toggle several times the Enable property but
with no effects.
-Can someone tell me more about the styles??
-Is there any built-in functionnality to create a
chart from my pivot table?
-Is there any built-in functionnality to swap
rows and columns?

Thanks!! have a nice week-end!
Claude
 
A

Alvin Bruney

The tooltip problem is a bug i've documented in the OWC. The only current
work around for this is to call the routine with the tooltip in a settimeout
function. Apparently, the bug is being caused due to a timing issue deep in
the IE architecture. The settimeout call gives the window object time to
draw itself on screen before applying the tooltip. If this is being called
from an external js or vbs file, there is no known workaround. If it is
being called from inside the page itself, it will work.

give IE window thread 100 milliseconds to draw itself and be comfortable
before adding tooltips.
SetTimeOut("FunctionWhichAddsToolTip()","100")

Chart from pivottable
Yes, all you need do is point the datasource to the pivottable and the chart
will render. I've found this article very helpful
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnacbk02/html/odc_4010c12.asp
Lower third of the page gives answers your questions exactly. Browse the
entire page though for a solid overview on the possibilities.

what are you trying to do with the styles?

I don't think there is functionality to swap rows and columns
hth
 
C

Claude Vernier

Thanks again for all your help.

I've tried your solution for the tooltiptext but I'm not
sure I understood everything.

Do you include the code taht remove and adds buttons and
set their tooltiptext in the FunctionWhichAddsToolTip()
function or do you load the buttons earlier and leave
this function empty only for IE to rest 100 miliseconds?

I tried the first one and it works.. sometimes! Weird...

About the styles, I've found that there is 6 possible
values but I'd like to know the effect of each one, I'd
like for example, to add a button on the toolbar that,
when is pressed, stay pressed and shows the corresponding
chart (in a DIV with style.display = none or inline).

Thanks for the tip on linking the chart and pivot table.
It's great, strangely, when adding a measure to the pivot
table its not been added to the chart as with the
dimensions.

Thanks again for your help,
Claude Vernier
 
A

Alvin Bruney

Do you include the code taht remove and adds buttons and
set their tooltiptext in the FunctionWhichAddsToolTip()
yes

I tried the first one and it works.. sometimes! Weird...

It's flaky, even annoying but that's the best work around out there.

i have a document somewhere which gives the styles constants, give me some
time to try to dig it up
 
C

Claude Vernier

Thanks!
You can send it to (e-mail address removed) removing
the NOSPAM ofo course...

Is TidBits your web site? It is great! Maybe it lacks a
description of the "TidBits" word for non-english user
like myself ;-)

Have a nice day!
Claude
 
A

Alvin Bruney

ya it is. i'll make a note of that. i'm doing it in my spare time. don't
much spare time :)
 

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