Sign in to follow this  
PUDYASTO

Multiseries With Asp

Recommended Posts

Now I use ASP, can help me, this is my source code

 

 

<%@ Language=VBScript %>

<HTML>

<HEAD>

<TITLE> FusionCharts - Array Example using Multi Series Column 3D Chart </TITLE>

<script LANGUAGE="Javascript" SRC="JS/FusionCharts.js"></SCRIPT>

</HEAD>

<!-- #INCLUDE FILE="FusionCharts.asp" -->

<!-- #INCLUDE FILE="DBConn.asp" -->

<BODY>

<center>

<%

Dim oRs, oRs2, strQuery

Dim strXML, strCategories, strDataCurr, strDataPrev, s

 

Set oRs = Server.CreateObject("ADODB.Recordset")

 

strQuery = "select top 10 a.* from (select kdpel as Kode_Pel , " & _

"SUM(case when kd_brg = '2-01-02-01-0005' then qty else 0 end) as MKIOS_05, " & _

"SUM(case when kd_brg = '2-01-02-01-0010' then qty else 0 end) as MKIOS_10, " & _

"SUM(case when kd_brg = '2-01-02-01-0020' then qty else 0 end) as MKIOS_20, " & _

"SUM(case when kd_brg = '2-01-02-01-0025' then qty else 0 end) as MKIOS_25, " & _

"SUM(case when kd_brg = '2-01-02-01-0050' then qty else 0 end) as MKIOS_50 " & _

"from IMPORTJUAL group by kdpel ) a "

 

Set oRs = oConn.Execute(strQuery)

'do while not oRs.eof

'for i=0 to oRs.Fields.count - 1

'response.Write(oRs.Fields("Kode_Pel").value)

'oRs.movenext

'next

'loop

%>

 

<%

strXML = "<chart caption='Sales by Product' numberPrefix='' formatNumberScale='0' rotateValues='1' placeValuesInside='1' decimals='0' >"

 

strCategories = "<categories>"

'do while not oRs.eof

for i=0 to oRs.Fields.count - 1

strCategories = strCategories & "<category name='" & response.Write(oRs.Fields("Kode_Pel").value) & "' />"

oRs.movenext

next

'loop

strCategories = strCategories & "</categories>"

 

strDataCurr = "<dataset seriesName='MKIOS_05'>"

'do while not oRs.eof

for i=0 to oRs.Fields.count - 1

strDataCurr = strDataCurr & "<set value='" & response.Write(oRs.Fields("MKIOS_05").value) & "' />"

oRs.movenext

next

'loop

strDataCurr = strDataCurr & "</dataset>"

 

strDataPrev = "<dataset seriesName='MKIOS_10'>"

'do while not oRs.eof

for i=0 to oRs.Fields.count - 1

strDataPrev = strDataPrev & "<set value='" & response.Write(oRs.Fields("MKIOS_10").value) & "' />"

oRs.movenext

next

'loop

strDataPrev = strDataPrev & "</dataset>"

 

strXMLI = strXML & strCategories & strDataCurr & strDataPrev & "</chart>"

 

Call renderChart("Charts/MSColumn3D.swf", "", strXMLI, "productSales", 600, 300, false, false)

 

%>

 

</center>

</BODY>

</HTML>

 

 

My chart cannot show and error result

Share this post


Link to post
Share on other sites

Hi,

 

Could you please let us know the following?

 

1. If you can see if there is a placeholder for chart which has come up. If so is it a blank white space or with a text error message

 

If blank, the chart swf has not been loaded.

 

If with message please let us know the message.

 

Also please share with us the generated XML as attached text file (from view source of the Browser).

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this