I have a form to pass date ranges to cfchart but its coming up empty, any
ideas?

 

 

<form method="post" action="chartresults.cfm" name="request_range">

            <p>Start Date: 

            <input type="text" name="startDate"
value="<cfoutput>#DateFormat(Now(), 'yyyy-mm-dd')#</cfoutput>"
onfocus="this.value=''" style="background-color:#f2f2f2;">

            <br>

            End Date: 

            <input type="text" name="endDate"
value="<cfoutput>#DateFormat(Now(), 'yyyy-mm-dd')#</cfoutput>"
onfocus="this.value=''" style="background-color:#f2f2f2;">

            <br />

            <input type="submit" name="submit" value="Submit" />

</form>

 

 

 

 

<CFSET start = #CREATEODBCDATETIME(startdate)#>

<CFSET end = #CREATEODBCDATETIME(enddate)#>

 

 

<cfquery name="Red"

                         datasource="xyz">

   Select * 

   From Counts 

   WHERE ((counts.sentdate BETWEEN #CreateODBCDate(start)# AND
#CreateODBCDate(end)#)) 

   AND msgtype = 'Red' 

</cfquery>

 

The total number of Red submissions are:
<b><cfoutput>#Red.recordcount#</cfoutput></b>

<p> </p>

 

<cfquery name="Blue"

                         datasource="xyz" >

   Select * 

   From Counts 

   WHERE ((counts.sentdate BETWEEN #CreateODBCDate(start)# AND
#CreateODBCDate(end)#)) 

   AND msgtype = 'Blue' 

</cfquery>

 

The total number of Blue submissions are:
<b><cfoutput>#Blue.recordcount#</cfoutput></b>

 

<p> </p>

 

<cfquery name="Green"

                         datasource="xyz" ">

   Select * 

   From Counts 

   WHERE ((counts.sentdate BETWEEN #CreateODBCDate(start)# AND
#CreateODBCDate(end)#)) 

   AND msgtype = 'Green' 

</cfquery>

 

The total number of Green submissions are:
<b><cfoutput>#Green.recordcount#</cfoutput></b>

 

 

<p> </p>

 

<cfquery name="Yellow"

                         datasource="xyz" >

   Select * 

   From Counts 

   WHERE ((counts.sentdate BETWEEN #CreateODBCDate(start)# AND
#CreateODBCDate(end)#)) 

   AND msgtype = 'Yellow' 

</cfquery>

 

The total number of Yellow submissions are:
<b><cfoutput>#Yellow.recordcount#</cfoutput></b>

<!--- sent by email --->

<p> </p>

<cfquery name="Everything"

                         datasource="xyz" >

   Select * 

   From Counts 

</cfquery>

 

The total number of All Color submissions are:
<b><cfoutput>#Everything.recordcount#</cfoutput></b>

 

<p> </p>

 

 

 

 

<p> </p>

<cfchart format="flash" scalefrom="1" scaleto="40" 

                                     backgroundcolor="##FFFFCC"

                                     showxgridlines="yes" 

                                    showygridlines="yes" 

                                     showborder="no" 

                                     fontbold="no" 

                                     fontitalic="no" 

                                    xaxistitle="CATEGORIES" 

                                     yaxistitle="COUNT" 

                                     show3d="yes" 

                                     rotated="no" 

                                    sortxaxis="no" 

                                     showlegend="yes" 

                                     showmarkers="yes"> 

                     <cfchartseries  type="bar"

                                           serieslabel="Color Teams" 

                                           seriescolor="##0099FF"

                                           paintStyle="shade"

                                           markerStyle="rectangle"

                                           colorlist = "##99ccFF, ##0099FF,
##9966FF, ##990099"> 

                                                             <cfchartdata
item="RED" value="#red.recordcount#">

                                                             <cfchartdata
item="BLUE" value="#blue.recordcount#">

                                                             <cfchartdata
item="GREEN" value="#green.recordcount#">

                                                             <cfchartdata
item="YELLOW" value="#yellow.recordcount#">

                     </cfchartseries>

</cfchart>



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:321429
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to