Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Newsgroup Archive
Microsoft Office
Developer Web Components
OWC11 chartspace with a recordset in asp, and error 80004005
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
Reply to thread
Message
[QUOTE="r7dis8qh, post: 6950058"] Thanks for the response, it took me a while, but it's sorted! ....not that google really helped all that much, i bought a copy of your book ;-) all the examples i've seen bind the data to the chart, rather than the chartspace (as you suggest in your 'rule of thumbs' table), as many have experienced, using cspace.datasource and cspace.charts.add togeather results in an extra blank table, so i'd been trying to bind the data to cspace.charts(0) which works for arrays, but throws error '80004005' when used with a record set so it seems we have to bind the data to the chartspace and then the 'formatting' to cspace.chart(0), which seems a little counter- intuitive to me... but, working result is this: Function Chart (oRecordSet) Set oChartSpace = Server.CreateObject("OWC11.Chartspace") Set c = oChartSpace.Constants Set oChartSpace.DataSource = oRecordSet oChartSpace.Charts(0).HasLegend = True oChartSpace.Charts(0).Type = c.chChartTypeColumnClustered oChartSpace.SetData c.chDimCategories, c.chDataBound, "Agent" oChartSpace.SetData c.chDimValues, c.chDataBound, "Total" Set oFso = Server.CreateObject("Scripting.FileSystemObject") szFileName = Server.MapPath(".") & "\" & oFso.GetTempName() oChartSpace.ExportPicture szFileName, "gif", 800, 400 Chart = ReadByteArray(szFileName) oFSO.DeleteFile szFileName End Function now i just need to pretty it up... PS. Great book Alvin, and a bargain! [/QUOTE]
Verification
Post reply
Forums
Archive
Newsgroup Archive
Microsoft Office
Developer Web Components
OWC11 chartspace with a recordset in asp, and error 80004005
Top