OWC11-Chart Control XML -> image

S

Sterling

I've been using FrontPage 2003 with OWC11 and generating exactly the
type of charts that I want quickly.

The Problem:
How do I take the code that's generated :

<object classid="clsid:0002E55D-0000-0000-C000-000000000046"
id="ChartSpace1">
<param name="XMLData" value="<xml
xmlns:x='urn:schemas-microsoft-com:eek:ffice:excel'>
<x:ChartSpace>
.....
</xml>">


And reroute this object/XML into an image using ASP?

I'd like to not have to write this from scratch using the APIs as that
can take an extremely long time for complex charts and be buggy.
 
D

David M. Andersen

Sterling said:
I've been using FrontPage 2003 with OWC11 and generating exactly the
type of charts that I want quickly.

The Problem:
How do I take the code that's generated :

<object classid="clsid:0002E55D-0000-0000-C000-000000000046"
id="ChartSpace1">
<param name="XMLData" value="<xml
xmlns:x='urn:schemas-microsoft-com:eek:ffice:excel'>
<x:ChartSpace>
....
</xml>">


And reroute this object/XML into an image using ASP?

I'd like to not have to write this from scratch using the APIs as that
can take an extremely long time for complex charts and be buggy.

I'd suggest using the XMLURL param.

<param name="XMLURL" value="give_me_data.asp?abc=1111&amp;def=2222" />

This way, you can put the code that generates the data in a separate
script. Also, the request to "give_me_data.asp" will keep all of the
cookies/session and authentication of the browser, so you won't get a
"please login" page.

In case you are curious, the XML files are essentially a subset of the
ones here:
http://www.microsoft.com/downloads/...52-3547-420a-a412-00a2662442d9&DisplayLang=en

VS.NET can use the .xsd files in there for tag completion.

An alternative that I've used in ASP.NET is to put the whole XML (or
HTML in OWC9) document in a .ascx file and render it to a string and
HtmlAttributeEncode the whole string and put it in the param. This is a
major pain to debug.

David M. Andersen
http://www.coe.uncc.edu/~danderse/
 
S

Sterling

I've been using FrontPage 2003 with OWC11 and generating exactly the
type of charts that I want quickly.

The Problem:
How do I take the code that's generated :

<object classid="clsid:0002E55D-0000-0000-C000-000000000046"
id="ChartSpace1">
<param name="XMLData" value="<xml
xmlns:x='urn:schemas-microsoft-com:eek:ffice:excel'>
<x:ChartSpace>
....
</xml>">


And reroute this object/XML into an image using ASP?

I'd like to not have to write this from scratch using the APIs as that
can take an extremely long time for complex charts and be buggy.


To clarify my question, if I try the following code of taking the
ChartSpace1 object from above and use 'ExportPicture' it doesn't
recognize
the object from above. I know the code isn't correct, but maybe this
might give a better idea conceptually of what I'm trying to do.

sFname = "imagename.gif"
ChartSpace1.ExportPicture server.MapPath(sFname), "gif", 600, 512

response.Write "<ing src='" & sFname & "'>"


Again, any help is greatly appreciated!

Sterling
 

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