M
Markus
I am attempting to return multiple charts on a single page. What I get
is the first chart being returned and none of the others. I am using
OWC11 and the charts returned need to be generated on the fly based on
filter data...so I can't save charts on the server as gifs and then
reference them.
Any help is appreciated
Thanks
Markus
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
chart1.ImageUrl = returnChartWeek("Week", "Areas", "areas")
chart2.ImageUrl = returnChartMonth("Month", "Areas", "areas")
chart3.ImageUrl = returnChartWeek("Week", "Total Units", "units")
chart4.ImageUrl = returnChartMonth("Month", "Total Units", "units")
End Sub
Private Function returnChartWeek(ByVal xAxisTitle, ByVal yAxisTitle,
ByVal chartType)
Dim ChartSpaceWeek As New OWC11.ChartSpace
'Microsoft.Office.Interop.OWC.ChartSpaceClass
Try
Response.Buffer = True
Response.ContentType = "image/gif"
'Return the new chart in GIF format.
ChartSpaceWeek = oCG.buildChart(xAxisTitle, yAxisTitle,
oDA.getChartDataWeek(chartType, 0, 0, 0, "", "", ""))
Response.BinaryWrite(ChartSpaceWeek.GetPicture("gif", 500, 400))
'Response.End()
Catch ex As Exception
Throw ex
End Try
End Function
Private Function returnChartMonth(ByVal xAxisTitle, ByVal yAxisTitle,
ByVal chartType)
Dim ChartSpaceMonth As New OWC11.ChartSpace
'Microsoft.Office.Interop.OWC.ChartSpaceClass
Try
Response.Buffer = True
Response.ContentType = "image/gif"
'Return the new chart in GIF format.
ChartSpaceMonth = oCG.buildChart(xAxisTitle, yAxisTitle,
oDA.getChartDataMonth(chartType, 0, 0, 0, "", "", ""))
Response.BinaryWrite(ChartSpaceMonth.GetPicture("gif", 500, 400))
'Response.End()
Catch ex As Exception
Throw ex
End Try
End Function
is the first chart being returned and none of the others. I am using
OWC11 and the charts returned need to be generated on the fly based on
filter data...so I can't save charts on the server as gifs and then
reference them.
Any help is appreciated
Thanks
Markus
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
chart1.ImageUrl = returnChartWeek("Week", "Areas", "areas")
chart2.ImageUrl = returnChartMonth("Month", "Areas", "areas")
chart3.ImageUrl = returnChartWeek("Week", "Total Units", "units")
chart4.ImageUrl = returnChartMonth("Month", "Total Units", "units")
End Sub
Private Function returnChartWeek(ByVal xAxisTitle, ByVal yAxisTitle,
ByVal chartType)
Dim ChartSpaceWeek As New OWC11.ChartSpace
'Microsoft.Office.Interop.OWC.ChartSpaceClass
Try
Response.Buffer = True
Response.ContentType = "image/gif"
'Return the new chart in GIF format.
ChartSpaceWeek = oCG.buildChart(xAxisTitle, yAxisTitle,
oDA.getChartDataWeek(chartType, 0, 0, 0, "", "", ""))
Response.BinaryWrite(ChartSpaceWeek.GetPicture("gif", 500, 400))
'Response.End()
Catch ex As Exception
Throw ex
End Try
End Function
Private Function returnChartMonth(ByVal xAxisTitle, ByVal yAxisTitle,
ByVal chartType)
Dim ChartSpaceMonth As New OWC11.ChartSpace
'Microsoft.Office.Interop.OWC.ChartSpaceClass
Try
Response.Buffer = True
Response.ContentType = "image/gif"
'Return the new chart in GIF format.
ChartSpaceMonth = oCG.buildChart(xAxisTitle, yAxisTitle,
oDA.getChartDataMonth(chartType, 0, 0, 0, "", "", ""))
Response.BinaryWrite(ChartSpaceMonth.GetPicture("gif", 500, 400))
'Response.End()
Catch ex As Exception
Throw ex
End Try
End Function