Hello,
I'm not sure if I posted this question already so if I did, please forgive me
and ignore this repetition.
I am trying to automate a process where a report was created in Word using the
same data set, sorted three times. The first sort is by date, the second by
Center, the third by Business Unit. I tried to create one .cfm file with three
subreports, but that seems to bog down our server. Then I thought I just make
the three reports regular reports with headers and footer and run them when the
button is clicked for this report. Just the first one (date) is produced.
Here's the code I have for it right now:
<cfcase value="11">
<cfset START = DateFormat(URL.ReportBeginDate,"mm/dd/yy")>
<cfset END = DateFormat(DateAdd("d",1,URL.ReportEndDate),"mm/dd/yy")>
<cfquery name="qryWeekInReview" datasource="#dsn#">
SELECT tblSCTicket.OutageStart
, tblSCTicket.OutageEnd
, tblCenters.CenterName
, tblPriorities.Abbrev
, tblSCTicket.SCTicket
, tblSCTicket.IssueTitle
, tblSCTicket.RootCause
, tblSCTicket.Impact
, tblSCTicket.Resolution
, tblBusinessUnits.BusinessUnitName
, tblSCTicket.ResultOfChange
, tblUserFacingAppImpact.UFAImpactStart
, tblUserFacingAppImpact.UFAImpactEnd
, tblUserFacingAppImpact.NumUsers
, tblImpactTypes.ImpactType
, DATEADD(Day, DATEDIFF(Day, 0, tblSCTicket.OutageStart), 0) as
OutageStartDt
, CASE WHEN tblSCTicket.ResultOfChange = '1' THEN 'ROC' END as
ROCIndicator
FROM pmdb..tblSCTicket tblSCTicket
, pmdb..tblUserFacingApps tblUserFacingApps
, pmdb..tblUserFacingAppImpact tblUserFacingAppImpact
, pmdb..tblBusinessUnits tblBusinessUnits
, pmdb..tblCenters tblCenters
, pmdb..tblPriorities tblPriorities
, pmdb..tblImpactTypes tblImpactTypes
WHERE tblSCTicket.SCTicket = tblUserFacingApps.SCTicket
AND tblUserFacingApps.UFAID = tblUserFacingAppImpact.UFAID
AND tblUserFacingAppImpact.BusinessUnitID =
tblBusinessUnits.BusinessUnitID
AND tblUserFacingAppImpact.LocationID = tblCenters.ID
AND tblSCTicket.PriorityID = tblPriorities.PriorityID
AND tblUserFacingAppImpact.ImpactType = tblImpactTypes.ImpactTypeID
AND tblSCTicket.DateEntered BETWEEN '#Start#' and '#End#'
</cfquery>
<cfreport format="pdf" template="rptWIRDate.cfr" query="qryWeekInReview">
<cfreportparam name = "StartDate" value = "#Start#">
<cfreportparam name = "EndDate" value = "#End#">
</cfreport>
<cfreport format="pdf" template="rptWIRCenter.cfr" query="qryWeekInReview">
<cfreportparam name = "StartDate" value = "#Start#">
<cfreportparam name = "EndDate" value = "#End#">
</cfreport>
<cfreport format="pdf" template="rptWIRBusinessUnit.cfr"
query="qryWeekInReview">
<cfreportparam name = "StartDate" value = "#Start#">
<cfreportparam name = "EndDate" value = "#End#">
</cfreport>
</cfcase>
Thanks for any help.
John
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k
Archive:
http://www.houseoffusion.com/groups/CF-Newbie/message.cfm/messageid:3739
Subscription: http://www.houseoffusion.com/groups/CF-Newbie/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15