Jump to content
Software FX Community

Re: Can not download chart data


User (Legacy)

Recommended Posts

Assuming no response means that the problem is on my side, I created 2 other 

pages using the same query. One page creates the chartfx object to show the

code, the other page shows a recordset column in a table. Here's the code:

Page 1: (www.earthcareus.com/page5.asp)

<HTML>

<BODY>

<DIV ID=[name] style="position:absolute; left:[left]; top:[top];

width:[width]; height:[height]">

<%

' Create Data for Chart

query = "select distinct surveyquestions.question_name,

surveyquestions.question_number, "

query = query + "(select count(*) from answers where answers.answer = 'YES'

and answers.id_survey = 2 and answers.id_questions = "

query = query + "surveyquestions.question_number) as 'Yes Answers', "

query = query + "(select count(*) from answers where answers.answer = 'NO'

and answers.id_survey = 2 and answers.id_questions = "

query = query + "surveyquestions.question_number) as 'No Answers' from

surveyquestions, answers where surveyquestions.id_survey = 2 order by

surveyquestions.question_number"

Set conn = Server.CreateObject("ADODB.Connection")

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

Set cmd = Server.CreateObject("ADODB.Command")

conn.open "DSN=EarthCare;", "earthcare", "earthcare"

cmd.CommandText = query

cmd.CommandType = 1

Set cmd.ActiveConnection = conn

rs.Open cmd, , 1, 1

%>

<table border = 1>

<%while not rs.eof %>

<tr><td><%=rs("Yes Answers")%></td><tr>

<% rs.MoveNext

wend

%>

</table>

<%

rs.close

conn.close

%>

<%=chart.GetHtmlTag("600","380")%>

</DIV>

</BODY>

</HTML>

Page 2: (www.earthcareus.com/page6.asp)

<HTML>

<BODY>

<DIV ID=[name] style="position:absolute; left:[left]; top:[top];

width:[width]; height:[height]">

<%

' Create Data for Chart

query = "select distinct surveyquestions.question_name,

surveyquestions.question_number, "

query = query + "(select count(*) from answers where answers.answer = 'YES'

and answers.id_survey = 2 and answers.id_questions = "

query = query + "surveyquestions.question_number) as 'Yes Answers', "

query = query + "(select count(*) from answers where answers.answer = 'NO'

and answers.id_survey = 2 and answers.id_questions = "

query = query + "surveyquestions.question_number) as 'No Answers' from

surveyquestions, answers where surveyquestions.id_survey = 2 order by

surveyquestions.question_number"

Set conn = Server.CreateObject("ADODB.Connection")

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

Set cmd = Server.CreateObject("ADODB.Command")

conn.open "DSN=EarthCare;", "earthcare", "earthcare"

cmd.CommandText = query

cmd.CommandType = 1

Set cmd.ActiveConnection = conn

rs.Open cmd, , 1, 1

Set chart = Server.CreateObject("ChartFX.WebServer")

chart.Title(2) = "Employee Satisfaction Survey Questions"

chart.AdoResultSet rs

chart.Gallery = 2

rs.close

conn.close

%>

<%=chart.GetHtmlTag("600","380")%>

</DIV>

</BODY>

</HTML>

Both pages display properly on computers that are part of the same domain as

the webserver that creates the chartfx object. However, on computers that

are not part of the same domain as the webserver, the page displaying the

result set in a table works fine, but the page displaying the result set as

a chart does not work saying that 'chart data can not be downloaded'. Can

someone please explain this?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...