Using XMLData and HTMLData ??

C

Claude Vernier

Hi,

I got my web application in C# finally running,
users can select an OLAP cube name, this cube gets loaded
in a pivot table
on their IE and a OWCChart is also linked to it.

Now, I need to give something to those users who does not
have OfficeXP...

Right now, for almost each cubes, I got an XML file that
contains the XMLData,
I send the content of this file in javascript and load it
into the OWC on the client side.

I'd like to create a OWC server-side, feed it the same
XMLData, and send the HTMLData to those users...

Here's my code:

Microsoft.Office.Interop.OWC.PivotTable oPT = new
Microsoft.Office.Interop.OWC.PivotTableClass();
oPT.XMLData = "Same XML that I send to
javascript...";
this.tdWithOWC.InnerHtml = oPT.HTMLData;

Here's the result:

The query could not be processed:
o The data provider didn't supply any further error
information.


What must I do ??
If anyone also any idea on the best way to identify users
who can't use the OWC.. tell me.
Right now, I'm using:

bool bExcelIsAccepted = false;
string[] aTypes = Page.Request.AcceptTypes;
foreach( string sType in aTypes )
{
if( sType == "application/vnd.ms-excel" )
bExcelIsAccepted =true;
}


Thanks you very much !!
Claude

ps: Sorry for my poor english
 
A

Alvin Bruney

It's better if you do a sniffer routine client side to detect if the OWC is
correctly installed on the client. Your code only tells you if the browser
supports the particular Mime type, but does not say if the client has OWC
installed on their machine. Here is what I use:
Sub CheckForOWC()
Dim objOWC

Dim retval on error resume next

Dim downloadPath downloadPath =
"http://download.microsoft.com/download/OfficeXPStandard/owc10/1033/WIN98MeX
P/EN-US/owc10.exe"

Set objOWC = CreateObject("OWC10.Chartspace")



if(objOWC is nothing) then if msgbox ("O.W.C. v10 is a required
component.",3,"Critical component missing!") = 6 then

window.navigate(downloadPath)

end if

End Sub





FYI: If you do proceed with a server side implementation of OWC and stream
it out to the browser where OWC is not installed, you will not get a pivot
table regardless of the Mime type used. What you will get is an html table
because without the activeX control installed (OWC) the browser does not
know what a pivot table looks like. Is that the effect you are looking for?
 
C

Claude Vernier

Yes !!!

It is the effect I'm after... I don't want my users to
have to install ActiveX if they don't want, so I'll have
to send the XMLData to the javascript AND the HTMLData,
I'll make the test and if it fails, I'll use the HTMLData
to display an HTML table.

Do you have any way to create on the server-side an OWC
pivot table and load it with the XMLData ?

Thanks for this first code snippet, the URL will sure be
useful too.

Thanks again, have a nice day,
Claude


-----Original Message-----
It's better if you do a sniffer routine client side to detect if the OWC is
correctly installed on the client. Your code only tells you if the browser
supports the particular Mime type, but does not say if the client has OWC
installed on their machine. Here is what I use:
Sub CheckForOWC()
Dim objOWC

Dim retval on error resume next

Dim downloadPath downloadPath =
"http://download.microsoft.com/download/OfficeXPStandard/ owc10/1033/WIN98MeX
P/EN-US/owc10.exe"

Set objOWC = CreateObject("OWC10.Chartspace")



if(objOWC is nothing) then if msgbox ("O.W.C. v10 is a required
component.",3,"Critical component missing!") = 6 then

window.navigate(downloadPath)

end if

End Sub





FYI: If you do proceed with a server side implementation of OWC and stream
it out to the browser where OWC is not installed, you will not get a pivot
table regardless of the Mime type used. What you will get is an html table
because without the activeX control installed (OWC) the browser does not
know what a pivot table looks like. Is that the effect you are looking for?


--
Regards,
Alvin Bruney
Got DotNet? Get it here...
http://www.networkip.net/dotnet/tidbits/default.htm
Hi,

I got my web application in C# finally running,
users can select an OLAP cube name, this cube gets loaded
in a pivot table
on their IE and a OWCChart is also linked to it.

Now, I need to give something to those users who does not
have OfficeXP...

Right now, for almost each cubes, I got an XML file that
contains the XMLData,
I send the content of this file in javascript and load it
into the OWC on the client side.

I'd like to create a OWC server-side, feed it the same
XMLData, and send the HTMLData to those users...

Here's my code:

Microsoft.Office.Interop.OWC.PivotTable oPT = new
Microsoft.Office.Interop.OWC.PivotTableClass();
oPT.XMLData = "Same XML that I send to
javascript...";
this.tdWithOWC.InnerHtml = oPT.HTMLData;

Here's the result:

The query could not be processed:
o The data provider didn't supply any further error
information.


What must I do ??
If anyone also any idea on the best way to identify users
who can't use the OWC.. tell me.
Right now, I'm using:

bool bExcelIsAccepted = false;
string[] aTypes = Page.Request.AcceptTypes;
foreach( string sType in aTypes )
{
if( sType == "application/vnd.ms-excel" )
bExcelIsAccepted =true;
}


Thanks you very much !!
Claude

ps: Sorry for my poor english


.
 

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