B
Bob [BVP]
I cannot get this to work for some reason.. I keep getting this
no matter what I do.. This a convert from ASP to ASP.NET
All assemblies have been installed, and machine.conf. updated
per 4guys.. I am at my whits end here.. and going to go buy
a charting component because I just can't seem to find any
descent support or docs on this product.. Any ideas ? Error
and the source follows.. the setdata fails no matter what I
put in there.. literal array, etc.. blah.. I have re-installed owc10
etc.. Thanks for your help..
Bob
===================
Exception Details: System.Runtime.InteropServices.COMException: Member not found.
Source Error:
Line 31: oChart.Charts(0).SeriesCollection.Add()
Line 32: oChart.Charts(0).SeriesCollection(0).Caption = "Pie Chart Caption"
Line 33: oChart.Charts(0).SeriesCollection(0).SetData(c.chDimCategories, c.chDataLiteral, pCat)
<%@ Page language="VB" aspcompat=true Debug="true" %>
<%@ import Namespace="System.IO" %>
<%@ import Namespace="Microsoft.Office.Interop.OWC" %>
<%@ import Namespace="Microsoft.VisualBasic" %>
<script language="VB" runat="Server">
Dim sFname As String
Dim c As Object
Dim oChart As Object
Dim nOrg As Byte
Dim sCaption As String
Dim pCat,pVals As Object
</script>
<html>
<body>
<form runat="server">
<h1>Realtime CPU Utilization by Configurations</h1>
<%'When the page loads the first time, set ndata to 5
pCat = "A,B,C,D,E"
pVals = "1,2,3,4,5"
' Create a Chart Object
'UPGRADE_NOTE: The 'OWC10.Chartspace' object is not registered in the migration machine. Copy this
link in your browser for more: ms-its:\Program Files\ASP to ASP.NET Migration
Assistant\AspToAspNet.chm::/1016.htm
oChart = Server.CreateObject("OWC10.Chartspace")
'oChart = New OWC.ChartSpace
'oChart = New OWC10.ChartSpace
c = oChart.Constants
oChart.Border.Color = c.chColorNone
oChart.Charts.Add()
oChart.Charts(0).Type = 18
oChart.Charts(0).SeriesCollection.Add()
oChart.Charts(0).SeriesCollection(0).Caption = "Pie Chart Caption"
oChart.Charts(0).SeriesCollection(0).SetData(c.chDimCategories, c.chDataLiteral, pCat)
oChart.Charts(0).SeriesCollection(0).SetData(c.chDimValues, c.chDataLiteral, pVals)
oChart.Charts(0).HasLegend = True
oChart.Charts(0).HasTitle = True
sFname = "Blah" & rnd(100) & "_" & Session.SessionID & ".gif"
oChart.ExportPicture(Server.MapPath(sFname), "gif", 400, 340)
Response.Write("<img src='" & sFname & "'>")
%>
</form>
</body>
</html>
no matter what I do.. This a convert from ASP to ASP.NET
All assemblies have been installed, and machine.conf. updated
per 4guys.. I am at my whits end here.. and going to go buy
a charting component because I just can't seem to find any
descent support or docs on this product.. Any ideas ? Error
and the source follows.. the setdata fails no matter what I
put in there.. literal array, etc.. blah.. I have re-installed owc10
etc.. Thanks for your help..
Bob
===================
Exception Details: System.Runtime.InteropServices.COMException: Member not found.
Source Error:
Line 31: oChart.Charts(0).SeriesCollection.Add()
Line 32: oChart.Charts(0).SeriesCollection(0).Caption = "Pie Chart Caption"
Line 33: oChart.Charts(0).SeriesCollection(0).SetData(c.chDimCategories, c.chDataLiteral, pCat)
<%@ Page language="VB" aspcompat=true Debug="true" %>
<%@ import Namespace="System.IO" %>
<%@ import Namespace="Microsoft.Office.Interop.OWC" %>
<%@ import Namespace="Microsoft.VisualBasic" %>
<script language="VB" runat="Server">
Dim sFname As String
Dim c As Object
Dim oChart As Object
Dim nOrg As Byte
Dim sCaption As String
Dim pCat,pVals As Object
</script>
<html>
<body>
<form runat="server">
<h1>Realtime CPU Utilization by Configurations</h1>
<%'When the page loads the first time, set ndata to 5
pCat = "A,B,C,D,E"
pVals = "1,2,3,4,5"
' Create a Chart Object
'UPGRADE_NOTE: The 'OWC10.Chartspace' object is not registered in the migration machine. Copy this
link in your browser for more: ms-its:\Program Files\ASP to ASP.NET Migration
Assistant\AspToAspNet.chm::/1016.htm
oChart = Server.CreateObject("OWC10.Chartspace")
'oChart = New OWC.ChartSpace
'oChart = New OWC10.ChartSpace
c = oChart.Constants
oChart.Border.Color = c.chColorNone
oChart.Charts.Add()
oChart.Charts(0).Type = 18
oChart.Charts(0).SeriesCollection.Add()
oChart.Charts(0).SeriesCollection(0).Caption = "Pie Chart Caption"
oChart.Charts(0).SeriesCollection(0).SetData(c.chDimCategories, c.chDataLiteral, pCat)
oChart.Charts(0).SeriesCollection(0).SetData(c.chDimValues, c.chDataLiteral, pVals)
oChart.Charts(0).HasLegend = True
oChart.Charts(0).HasTitle = True
sFname = "Blah" & rnd(100) & "_" & Session.SessionID & ".gif"
oChart.ExportPicture(Server.MapPath(sFname), "gif", 400, 340)
Response.Write("<img src='" & sFname & "'>")
%>
</form>
</body>
</html>