donf

Members
  • Content count

    9
  • Joined

  • Last visited

About donf

  • Rank
    Forum Newbie
  1. Thanks for the tip. I added this line: strXML += "<embed src='FusionCharts/FCF_MSColumn2D.swf' flashVars='&dataURL=strXML&chartWidth=800&chartHeight=400' quality='high' width='800' height='400' name='Column2D' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />" just ahead of the object close tag but get an error that says "error loading data". I expect this is in the dataURL specification. How would you code this given that the data is all in the string? (See original post.)
  2. My charts seem to work fine with internet explorer but they do not display with FireFox, Chrome, or Safari. Can someone suggest what the problem might be? Protected Sub Page_PreRenderComplete(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreRenderComplete ' Generate chart in Literal Control FCLiteral.Text = CreateCharts() End Sub Public Function CreateCharts() As String Dim strXML As String = "" If Session("Location") <> "--- Select Location ---" Then Dim oConn As SqlConnection = New SqlConnection(ConfigurationManager.ConnectionStrings("TrafficCountsConnectionString").ConnectionString) 'Dim SQL As String = "SELECT * FROM countmaster WHERE loc_ID = [" + Session("location").ToString + "] ORDER BY _year" Dim SQL As String = "SELECT * FROM countmaster WHERE (loc_ID = @Loc_ID) ORDER BY _year" Dim oCommand As New SqlCommand(SQL, oConn) oConn.Open() oCommand.Parameters.AddWithValue("@Loc_ID", Session("Location")) Dim oReader As SqlDataReader = oCommand.ExecuteReader strXML = "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0' width='800' height='400' id='Column2D' > " strXML += "<param name='movie' value='FusionCharts/FCF_Column3D.swf?chartWidth=800&chartHeight=400' /> " strXML += "<param name='FlashVars' value=" + Chr(34) strXML += "&dataXML=" strXML += "<graph caption='Historical Traffic Volumes' subcaption='" + tcSelector1.Street + " - " + tcSelector1.Limits + "' xAxisName='Year' yAxisName='Volume (ADT)' decimalPrecision='0' formatNumberScale='0'>" While oReader.Read() If oReader("validation") = True Then strXML += "<set name='" + oReader("_year").ToString.Trim + "' value='" + oReader("ADT").ToString.Trim + "' color='fFD8F8' />" Else strXML += "<set name='" + oReader("_year").ToString.Trim + "' value='" + oReader("ADT").ToString.Trim + "' color='AFD8F8' />" End If End While strXML += "</graph>" + Chr(34) + " />" strXML += "<param name='quality' value='high' /> " strXML += "</object>" oReader.Close() oConn.Close() Return strXML Else Return "Please select your count location" End If End Function Thanks