Hi,
I have created several queries which produce the same data based on a slightly difference set of variables:
	The only variable that changes is the Power Rating - it has various ranges and I just created a query for each one.
The output gets mashed up so that the number of records are counted and divided by a count of the days in the date range to produce a number N:
	Which all works. But now I need to output the records in a table - fine, except that I have 12 different query sets to work from.
Is there anyway to have the source of my output table as a variable whose value is changed when the user clicks on the number N - ie showing the records in that query set? I was thinking that an onclick event might change the variable value, but don't know how.
Thanks
Neil
					I have created several queries which produce the same data based on a slightly difference set of variables:
Code:
	<cfquery name="KWBand1S" dbtype="query"> select ClientFK, ResponseLevelFK, PowerRating, WORecDate, ActualCompDate, QuoteACDate, QuotePDate from getPumpsDate where ResponseLevelFK like 'Standard' and (PowerRating >0 and PowerRating <=2.9) </cfquery>
The output gets mashed up so that the number of records are counted and divided by a count of the days in the date range to produce a number N:
Code:
	<cfset intDayTotal = 0>
		<cfloop query="KWBand1S">
		<cfset dtFrom = #WORecDate# />
		<cfset dtTo = #ActualCompDate# />
		<cfset ctDays = DateDiff ("d", dtFrom, dtTo)>
		<cfset intDayTotal = intDayTotal + ctDays>
		</cfloop>
		<cfset RecCount = KWBand1S.RecordCount>
			<cfif RecCount NEQ 0>
			<cfset KWBand1SD = intDayTotal/RecCount>
			<cfoutput>#numberFormat(KWBand1SD, "___._")#</cfoutput>
				
			<cfelse>
			-
			</cfif>
Is there anyway to have the source of my output table as a variable whose value is changed when the user clicks on the number N - ie showing the records in that query set? I was thinking that an onclick event might change the variable value, but don't know how.
Thanks
Neil
Comment