close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

combine chart w session variables

Thread began 3/31/2011 10:13 am by davedvst392699 | Last modified 4/04/2011 11:02 am by davedvst392699 | 3690 views | 10 replies

davedvst392699

combine chart w sessions var

I have made all the recommended changes so far and still no success. I have re-pasted the AAABar1.asp with all the changes so far. Let me know if i have messed up anything.

<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!--#include virtual="\Connections\usertest.asp" -->
<%
Dim WADWCdboYTDTOTAL__ParamSM
WADWCdboYTDTOTAL__ParamSM = "0"
If (Request.QueryString("session_RepID") <> "") Then
WADWCdboYTDTOTAL__ParamSM = Request.QueryString("session_RepID")
End If
%>
<%
Set WADWCdboYTDTOTAL_cmd = Server.CreateObject ("ADODB.Command")
WADWCdboYTDTOTAL_cmd.ActiveConnection = MM_usertest_STRING
WADWCdboYTDTOTAL_cmd.CommandText = "SELECT LEFT(DATENAME(month, DATE), 3) + ' ' + LTRIM(STR(DAY(DATE))) + ', ' + LTRIM(YEAR(DATE)) AS XLABEL, SUM(Amount) AS YVALUE FROM dbo.YTDTOTAL WHERE SM LIKE ? GROUP BY LEFT(DATENAME(month, DATE), 3) + ' ' + LTRIM(STR(DAY(DATE))) + ', ' + LTRIM(YEAR(DATE)), DATEPART(year, DATE), DATEPART(month, DATE), DATEPART(day, DATE) ORDER BY DATEPART(year, DATE), DATEPART(month, DATE), DATEPART(day, DATE)"
WADWCdboYTDTOTAL_cmd.Prepared = true
WADWCdboYTDTOTAL_cmd.Parameters.Append WADWCdboYTDTOTAL_cmd.CreateParameter("param1", 201, 1, 10, WADWCdboYTDTOTAL__ParamSM) ' adLongVarChar

Set WADWCdboYTDTOTAL = WADWCdboYTDTOTAL_cmd.Execute
WADWCdboYTDTOTAL_numRows = 0
%>
<%
Dim Recordset1
Dim Recordset1_cmd
Dim Recordset1_numRows

Set Recordset1_cmd = Server.CreateObject ("ADODB.Command")
Recordset1_cmd.ActiveConnection = MM_usertest_STRING
Recordset1_cmd.CommandText = "SELECT LEFT(DATENAME(month, DATE), 3) + ' ' + LTRIM(STR(DAY(DATE))) + ', ' + LTRIM(YEAR(DATE)) AS XLABEL, SUM(Cost) AS YVALUE FROM dbo.YTDTOTAL GROUP BY LEFT(DATENAME(month, DATE), 3) + ' ' + LTRIM(STR(DAY(DATE))) + ', ' + LTRIM(YEAR(DATE)), DATEPART(year, DATE), DATEPART(month, DATE), DATEPART(day, DATE) ORDER BY DATEPART(year, DATE), DATEPART(month, DATE), DATEPART(day, DATE)"
Recordset1_cmd.Prepared = true

Set Recordset1 = Recordset1_cmd.Execute
Recordset1_numRows = 0
%>
<%
Dim WADWCdboYTDTOTAL__numRows
Dim WADWCdboYTDTOTAL__index

WADWCdboYTDTOTAL__numRows = -1
WADWCdboYTDTOTAL__index = 0
WADWCdboYTDTOTAL_numRows = WADWCdboYTDTOTAL_numRows + WADWCdboYTDTOTAL__numRows
%>
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE wa_dwc SYSTEM "wa_dwc.dtd">
<wa_dwc name="AmountAvePreset" version="1.0.0">
<color_wheel name="SLATE">
<color>#00FF00</color>
<color>#d8dcbf</color>
<color>#777890</color>
<color>#b0b6bd</color>
<color>#eaebfc</color>
<color>#a2a5b9</color>
</color_wheel>
<title style=" font-size:16px; color:#d7e6f9; text-align:center;">Revenue%20Totals</title>
<background color="#0c0b12" align="left" valign="top"/>
<innerbg startcolor="#50516b" endcolor="#2d2b2e" direction="90"/>
<yaxis color="#888d93" gridcolor="#767a7f">
<labels size="11" fontcolor="#e3e3e4" linecolor="#767a7f">
</labels>
<legend size="12" color="#d7e6f9">Amount</legend>
</yaxis>
<xaxis color="#999999" gridcolor="#FF6600" offset="true">
<legend size="12" color="#d7e6f9">Weeks</legend>
<labels size="11" fontcolor="#e3e3e4" orientation="0" linecolor="#767a7f">
</labels>
</xaxis>
<data>
<dataset type="bar" style="{font-size:9px;color:#888d93;}" size="9" width="2" color="#00FF00" label="range%20from%20Jan%201%202011" dotsize="5" opacity="80" abstraction="4" outline="#888d93" linecolor="#888d93" subtype="fade">
<%
While ((WADWCdboYTDTOTAL__numRows <> 0) AND (NOT WADWCdboYTDTOTAL.EOF))
%><point >
<label><%=(WADWCdboYTDTOTAL.Fields.Item("XLABEL"). Value)%></label>
<value><%=(WADWCdboYTDTOTAL.Fields.Item("YVALUE"). Value)%></value>
</point><%
WADWCdboYTDTOTAL__index=WADWCdboYTDTOTAL__index+1
WADWCdboYTDTOTAL__numRows=WADWCdboYTDTOTAL__numRows-1
WADWCdboYTDTOTAL.MoveNext()
Wend
%>
</dataset>
<dataset axis="right" type="line" style="{font-size:9px;color:#888d93;}" size="9" width="2" color="#FF9900" label="cost%20range%20from%20Jan%201%202011" dotsize="5" opacity="80" abstraction="4" outline="#888d93" linecolor="#888d93" subtype="dot">
<%
While ((WADWCdboYTDTOTAL__numRows <> 0) AND (NOT WADWCdboYTDTOTAL.EOF))
%><point >
<label><%=(WADWCdboYTDTOTAL.Fields.Item("XLABEL"). Value)%></label>
<value><%=(WADWCdboYTDTOTAL.Fields.Item("YVALUE"). Value)%></value>
</point><%
WADWCdboYTDTOTAL__index=WADWCdboYTDTOTAL__index+1
WADWCdboYTDTOTAL__numRows=WADWCdboYTDTOTAL__numRows-1
WADWCdboYTDTOTAL.MoveNext()
Wend
%>
</dataset>
</data><rightyaxis><legend size="12" color="#d7e6f9">Cost</legend></rightyaxis>
</wa_dwc>
<%
WADWCdboYTDTOTAL.Close()
Set WADWCdboYTDTOTAL = Nothing
%>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...