I think it is through a query string...
I Query FD (FirstDay) and LD (LastDays) on the previous page like this (I set <%session.lcid=1033%> on the top of the page, so that the date is created in the american way, otherwise the graph is not displayed):
dim LD
dim FD
dim todaydate
todaydate = Day(date)
if RSD > todaydate then
FD = DateSerial(Year(Date), Month(Date) -2, RSD)
LD = DateSerial(Year(Date), Month(Date) -1, RSD -1)
else
FD = DateSerial(Year(Date), Month(Date) -1, RSD)
LD = DateSerial(Year(Date), Month(Date) -0, RSD -1)
end if
and then I pass them through a link and the url to the next page that displays the graph.
The url look then like this:
.../protected2.asp?Site_ID=5&Site_Name=Site%202&AM=4361&FD=9/15/2010&LD=10/14/2010
The code for the graph on the page displaying it is:
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="940" height="200">
<param name="movie" value="DynamicWebCharts/open-flash-chart.swf?data=DynamicWebCharts/Data/protected2_dataparser1.asp?Site_ID=<%=Request.QueryString("Site_ID")%>%26FD=<%=Request.QueryString("FD")%>%26LD=<%=Request.QueryString("LD")%>" />
<param name="quality" value="high" />
<embed src="DynamicWebCharts/open-flash-chart.swf?data=DynamicWebCharts/Data/protected2_dataparser1.asp?Site_ID=<%=Request.QueryString("Site_ID")%>%26FD=<%=Request.QueryString("FD")%>%26LD=<%=Request.QueryString("LD")%>" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="940" height="200"></embed>
</object>
The code of the data page looks like this:
<%
Dim MM_Stats14_STRING
MM_Stats14_STRING = "dsn=Login;"
%>
<%
Dim WADWCStats__ParamSite_ID
WADWCStats__ParamSite_ID = "-1"
If (Request.QueryString("Site_ID") <> "") Then
WADWCStats__ParamSite_ID = Request.QueryString("Site_ID")
End If
Dim WADWCStats__ParamFistDay
WADWCStats__ParamFistDay = "-1"
If (Request.QueryString("FD") <> "") Then
WADWCStats__ParamFistDay = Request.QueryString("FD")
End If
Dim WADWCStats__ParamLastDay
WADWCStats__ParamLastDay = "-1"
If (Request.QueryString("LD") <> "") Then
WADWCStats__ParamLastDay = Request.QueryString("LD")
End If
Dim WADWCStats
Dim WADWCStats_cmd
Dim WADWCStats_numRows
Set WADWCStats_cmd = Server.CreateObject ("ADODB.Command")
WADWCStats_cmd.ActiveConnection = MM_Stats14_STRING
WADWCStats_cmd.CommandText = "SELECT Stats_Date AS XLABEL, Minutes AS YVALUE FROM Stats WHERE Site_ID = " & Request.QueryString("Site_ID") & " AND Stats_Date >= #" & Request.QueryString("FD") & "# AND Stats_Date <= #" & Request.QueryString("LD") & "# ORDER BY Stats_Date"
WADWCStats_cmd.Prepared = true
Set WADWCStats = WADWCStats_cmd.Execute
WADWCStats_numRows = 0
%>
Does that make sense, does this helps?
If I don't create the date in the american way and sent it in the uk way the graph doesn't display so I think I have to change somehow the way the graph wants to receive the date, but where?
Thanks very much for the help