DancingFighterG
asked on
Cfoutput placement fustration.
Hello, I'm very fustrated right now with getting things to print out to the screen. I have this code that works fine but because I don't have the cfoutput tags in the right spot it's giving me the following error;
source = #selectSource
Could not get the parameter value due to:
mispelling OR the query attribute is not defined right. Can someone tell me in my code where to properly put these tags because obvioulsy I don't know well enough. Here is the code.
<!--- Secure this page! --->
<!--- Ensure that you list the correct url of this page in the "This Page" variable. --->
<cfset ThisPage = "/markwest/accounting_fina nce/FinAcc tng/dsp_AP PostingSum mary.cfm">
<cfinclude template="/markwest/blocks /SecurePag e.cfm">
<!--- End Secure this page! --->
<cf_header title="Epicor A/P Posting Summary" showDateJS="yes">
<cfinclude template="/markwest/blocks /dsp_Page_ Navigation .cfm">
<cfif not isdefined("url.source")>
<cfset url.source = "All">
</cfif>
<cfset batch_amount = 0>
<cfset batch_count = 0>
<cfset last_company = "">
<cfset last_type = "">
<cfset last_source = "">
<cfset source = '#selectSource#'>
<cfquery name="qry_APcompanies" datasource="core">
select company_name, db_name
from pltmaster..smcomp
where company_id in (select company_id from pltmaster..smperm where app_id = 4000)
and company_id not in (6,16)
order by 1
</cfquery>
<h2>Epicor A/P Posting Summary</h2>
<form name="FormMain" action=#thisPage# method="post">
<h3>A/P Records to Post</h3>
<cfoutput>
<table width="850" border="0">
<tr>
<td>
<select name="selectSource" onchange="document.searchf orm.submit ();">
<cfif #source# eq "All">
<option value="All" selected>All
<cfelse>
<option value="All" >All
</cfif>
<cfif #source# eq "Right Angle">
<option value="Right Angle" selected>Right Angle
<cfelse>
<option value="Right Angle">Right Angle
</cfif>
<cfif #source# eq "Expense Reporting">
<option value="Expense Reporting" selected>Expense Reporting
<cfelse>
<option value="Expense Reporting">Expense Reporting
</cfif>
</select>
</td>
</tr>
<tr><tr><td><input type="Submit" name="makeReport" value="Make Report"</tr></tr></td>
<tr>
<td width="200"><b>Company</b> </td>
<td width="100"><b>Source System</b></td>
<td width="50"><b>Trans. Ctrl Num</b></td>
<td width="75"><b>Doc. Ctrl Num</b></td>
<td width="75"><b>Trans Type</b></td>
<td width="50"><b>Amount</b></ td>
<td width="125"><b>Vendor</b>< /td>
<td width="25"><b>Hold Flag</b></td>
<td width="50"><b>Transfer Date</b></td>
</tr>
<cfloop query="qry_APcompanies">
<cfquery name="qry_APToPost" datasource="core">
<cfif '#selectSource#' eq "Right Angle">
select isNull(m.mw_source_system, 'Epicor') as mw_source_system, i.trx_ctrl_num, i.doc_ctrl_num, i.vendor_code, a.address_name,t.trx_type_ desc, i.amt_gross, m.mw_processed_date, i.hold_flag
from #qry_APcompanies.db_name#. .apinpchg i, #qry_APcompanies.db_name#. .mw_apinpc hg m, #qry_APcompanies.db_name#. .aptrxtyp t, #qry_APcompanies.db_name#. .apmaster a
where i.trx_ctrl_num = m.trx_ctrl_num
and i.trx_type = t.trx_type
and i.vendor_code = a.vendor_code
and a.address_type = 0
and mw_source_system = '#selectSource#'
order by 2
<cfelseif '#selectSource#'eq "Expense Reporting">
select isNull(m.mw_source_system, 'Epicor') as mw_source_system, i.trx_ctrl_num, i.doc_ctrl_num, i.vendor_code, a.address_name,t.trx_type_ desc, i.amt_gross, m.mw_processed_date, i.hold_flag
from #qry_APcompanies.db_name#. .apinpchg i, #qry_APcompanies.db_name#. .mw_apinpc hg m, #qry_APcompanies.db_name#. .aptrxtyp t, #qry_APcompanies.db_name#. .apmaster a
where i.trx_ctrl_num = m.trx_ctrl_num
and i.trx_type = t.trx_type
and i.vendor_code = a.vendor_code
and a.address_type = 0
and mw_source_system = '#selectSource#'
order by 2
<cfelse>
select isNull(m.mw_source_system, 'Epicor') as mw_source_system, i.trx_ctrl_num, i.doc_ctrl_num, i.vendor_code, a.address_name,t.trx_type_ desc, i.amt_gross, m.mw_processed_date, i.hold_flag
from #qry_APcompanies.db_name#. .apinpchg i, #qry_APcompanies.db_name#. .mw_apinpc hg m, #qry_APcompanies.db_name#. .aptrxtyp t, #qry_APcompanies.db_name#. .apmaster a
where i.trx_ctrl_num = m.trx_ctrl_num
and i.trx_type = t.trx_type
and i.vendor_code = a.vendor_code
and a.address_type = 0
</cfif>
</cfquery>
<cfset coname = #qry_APcompanies.company_n ame#>
<cfloop query="qry_APToPost">
<cfif #batch_count# eq "0">
<cfset last_company = #coname#>
<cfset last_type = #qry_APToPost.trx_type_des c#>
<cfset last_source = #mw_source_system#>
</cfif>
<cfif #last_company# neq #coname# or #last_type# neq #trx_type_desc# or #last_source# neq #mw_source_system#>
<tr>
<td><strong>Total</strong> </td>
<td></td>
<td></td>
<td></td>
<td><strong>#batch_count# #last_type#(s)</strong></t d>
<td><strong>#DollarFormat( batch_amou nt)#</stro ng></td>
<td></td>
<td></td>
<td></td>
</tr>
<cfset batch_amount = 0>
<cfset batch_count = 0>
<cfset last_company = #coname#>
<cfset last_source = #mw_source_system#>
</cfif>
<tr>
<td>#coname#</td>
<td>#mw_source_system#</td >
<td>#trx_ctrl_num#</td>
<td>#doc_ctrl_num#</td>
<td>#trx_type_desc#</td>
<td>#DollarFormat(amt_gros s)#</td>
<td>#address_name#</td>
<td>#hold_flag#</td>
<td>#dateformat(mw_process ed_date, "mm/dd/yy")#</td>
</tr>
<cfset batch_amount = #batch_amount# + #amt_gross#>
<cfset batch_count = #batch_count# + 1>
</cfloop>
<tr>
<td><strong>Total</strong> </td>
<td></td>
<td></td>
<td></td>
<td><strong>#batch_count# #last_type#(s)</strong></t d>
<td><strong>#DollarFormat( batch_amou nt)#</stro ng></td>
<td></td>
<td></td>
<td></td>
</tr>
</table>
<!---Cool---->
<h3>A/P Transfer Problems</h3>
<table width="800">
<tr>
<td width="250"><b>Company</b> </td>
<td width="150"><b>Source System</b></td>
<td width="50"><b>Doc. Ctrl Num</b></td>
<td width="50"><b>Amount</b></ td>
<td width="50"><b>Vendor Code</b></td>
<td width="250"><b>Transfer Error</b></td>
</tr>
<cfloop query="qry_APcompanies">
<cfquery name="qry_APTransferErrors " datasource="core">
select distinct doc_ctrl_num, convert( varchar, dateadd(dd,(date_doc-69359 6),'1900/0 1/01'), 101 ) as 'date_doc', trx_type, apply_to_num, <!---apply_trx_type, --->convert(numeric(10,2), amt_gross) amt_gross, vendor_code, pay_to_addr1, mw_source_system, tiSeverity, vcMessage, vcSource
from #qry_APcompanies.db_name#. .mw_apinpc hg chg, #qry_APcompanies.db_name#. .mw_errors e
where chg.trx_ctrl_num = e.vcTrxCtrlNum
and doc_ctrl_num not in (select doc_ctrl_num from #qry_APcompanies.db_name#. .apinpchg union select doc_ctrl_num from #qry_APcompanies.db_name#. .apvohdr)
and mw_processed_date is null
and amt_gross <> 0
order by 1
</cfquery>
<cfset coname = #qry_APcompanies.company_n ame#>
<cfloop query="qry_APTransferError s">
<cfoutput query="qry_APTransferError s">
<tr>
<td>#coname#</td>
<td>#mw_source_system#</td >
<td><a href="dsp_APTransferDetail s.cfm?syst em=#mw_sou rce_system #&doc_num= #doc_ctrl_ num#">#doc _ctrl_num# </a></td>
<td>#DollarFormat(amt_gros s)#</td>
<td>#vendor_code#</td>
<td>#vcMessage#</td>
</tr>
</cfoutput>
</cfloop>
</cfloop>
</table>
<!---Cool---->
<h3>A/P Source System to Epicor Reconciliation</h3>
<cfquery name="qry_sourceMissing" datasource="core">
select 'Right Angle' as source_system, InvoiceNumber as invoice_number,
(select BANme from [mwdevsv14\RightAngle].Rig htAngleTes t.dbo.Busi nessAssoci ate where BAID = InternalBAID) as internal_company,
(select BANme from [mwdevsv14\RightAngle].Rig htAngleTes t.dbo.Busi nessAssoci ate where BAID = ExternalBAID) as customer_company,
InvoiceDate as statement_date, InvoiceAmount as total_value, FedDate as fed_date
from [mwdevsv14\RightAngle].Rig htAngleTes t.dbo.Paya bleHeader SIH
where InvoiceAmount <> 0
and InvoiceDate > '1/1/05'
and InternalBAID not in (631, 607, 375, 401) -- these are the SWBU companies that don't end up in RA
and Matched = 'Y'
and status <> 'H'
and Status <> 'P'
<!--- and PybleHdrTmplteID <> 901 --->
and InvoiceNumber not in
(select doc_ctrl_num from MWHydrocarbon..aptrxage
union select doc_ctrl_num from MWHydrocarbon..mw_apinpchg
union select doc_ctrl_num from MWEnergyAppal..mw_apinpchg
union select doc_ctrl_num from MWMichigan..mw_apinpchg
union select doc_ctrl_num from MLPWestShore..mw_apinpchg
union select doc_ctrl_num from Matrex..mw_apinpchg)
order by 1, InvoiceDate, InvoiceNumber
</cfquery>
<table width="800">
<tr>
<td width="100"><b>Source System</b></td>
<td width="120"><b>Company</b> </td>
<td width="50"><b>Vendor</b></ td>
<td width="50"><b>Doc. Ctrl Num</b></td>
<td width="50"><b>Amount</b></ td>
<td width="50"><b>Statement Date</b></td>
</tr>
<cfoutput query="qry_sourceMissing">
<tr>
<td>#source_system#</td>
<td>#internal_company#</td >
<td>#customer_company#</td >
<td>#invoice_number#</td>
<td>#DollarFormat(total_va lue)#</td>
<td>#dateformat(statement_ date, "mm/dd/yy")#</td>
</tr>
</cfoutput>
</table>
</form>
<cf_footer>
I've taken out every cfoutput with the exception of two. Please help get this is easy problem fix.
source = #selectSource
Could not get the parameter value due to:
mispelling OR the query attribute is not defined right. Can someone tell me in my code where to properly put these tags because obvioulsy I don't know well enough. Here is the code.
<!--- Secure this page! --->
<!--- Ensure that you list the correct url of this page in the "This Page" variable. --->
<cfset ThisPage = "/markwest/accounting_fina
<cfinclude template="/markwest/blocks
<!--- End Secure this page! --->
<cf_header title="Epicor A/P Posting Summary" showDateJS="yes">
<cfinclude template="/markwest/blocks
<cfif not isdefined("url.source")>
<cfset url.source = "All">
</cfif>
<cfset batch_amount = 0>
<cfset batch_count = 0>
<cfset last_company = "">
<cfset last_type = "">
<cfset last_source = "">
<cfset source = '#selectSource#'>
<cfquery name="qry_APcompanies" datasource="core">
select company_name, db_name
from pltmaster..smcomp
where company_id in (select company_id from pltmaster..smperm where app_id = 4000)
and company_id not in (6,16)
order by 1
</cfquery>
<h2>Epicor A/P Posting Summary</h2>
<form name="FormMain" action=#thisPage# method="post">
<h3>A/P Records to Post</h3>
<cfoutput>
<table width="850" border="0">
<tr>
<td>
<select name="selectSource" onchange="document.searchf
<cfif #source# eq "All">
<option value="All" selected>All
<cfelse>
<option value="All" >All
</cfif>
<cfif #source# eq "Right Angle">
<option value="Right Angle" selected>Right Angle
<cfelse>
<option value="Right Angle">Right Angle
</cfif>
<cfif #source# eq "Expense Reporting">
<option value="Expense Reporting" selected>Expense Reporting
<cfelse>
<option value="Expense Reporting">Expense Reporting
</cfif>
</select>
</td>
</tr>
<tr><tr><td><input type="Submit" name="makeReport" value="Make Report"</tr></tr></td>
<tr>
<td width="200"><b>Company</b>
<td width="100"><b>Source System</b></td>
<td width="50"><b>Trans. Ctrl Num</b></td>
<td width="75"><b>Doc. Ctrl Num</b></td>
<td width="75"><b>Trans Type</b></td>
<td width="50"><b>Amount</b></
<td width="125"><b>Vendor</b><
<td width="25"><b>Hold Flag</b></td>
<td width="50"><b>Transfer Date</b></td>
</tr>
<cfloop query="qry_APcompanies">
<cfquery name="qry_APToPost" datasource="core">
<cfif '#selectSource#' eq "Right Angle">
select isNull(m.mw_source_system,
from #qry_APcompanies.db_name#.
where i.trx_ctrl_num = m.trx_ctrl_num
and i.trx_type = t.trx_type
and i.vendor_code = a.vendor_code
and a.address_type = 0
and mw_source_system = '#selectSource#'
order by 2
<cfelseif '#selectSource#'eq "Expense Reporting">
select isNull(m.mw_source_system,
from #qry_APcompanies.db_name#.
where i.trx_ctrl_num = m.trx_ctrl_num
and i.trx_type = t.trx_type
and i.vendor_code = a.vendor_code
and a.address_type = 0
and mw_source_system = '#selectSource#'
order by 2
<cfelse>
select isNull(m.mw_source_system,
from #qry_APcompanies.db_name#.
where i.trx_ctrl_num = m.trx_ctrl_num
and i.trx_type = t.trx_type
and i.vendor_code = a.vendor_code
and a.address_type = 0
</cfif>
</cfquery>
<cfset coname = #qry_APcompanies.company_n
<cfloop query="qry_APToPost">
<cfif #batch_count# eq "0">
<cfset last_company = #coname#>
<cfset last_type = #qry_APToPost.trx_type_des
<cfset last_source = #mw_source_system#>
</cfif>
<cfif #last_company# neq #coname# or #last_type# neq #trx_type_desc# or #last_source# neq #mw_source_system#>
<tr>
<td><strong>Total</strong>
<td></td>
<td></td>
<td></td>
<td><strong>#batch_count# #last_type#(s)</strong></t
<td><strong>#DollarFormat(
<td></td>
<td></td>
<td></td>
</tr>
<cfset batch_amount = 0>
<cfset batch_count = 0>
<cfset last_company = #coname#>
<cfset last_source = #mw_source_system#>
</cfif>
<tr>
<td>#coname#</td>
<td>#mw_source_system#</td
<td>#trx_ctrl_num#</td>
<td>#doc_ctrl_num#</td>
<td>#trx_type_desc#</td>
<td>#DollarFormat(amt_gros
<td>#address_name#</td>
<td>#hold_flag#</td>
<td>#dateformat(mw_process
</tr>
<cfset batch_amount = #batch_amount# + #amt_gross#>
<cfset batch_count = #batch_count# + 1>
</cfloop>
<tr>
<td><strong>Total</strong>
<td></td>
<td></td>
<td></td>
<td><strong>#batch_count# #last_type#(s)</strong></t
<td><strong>#DollarFormat(
<td></td>
<td></td>
<td></td>
</tr>
</table>
<!---Cool---->
<h3>A/P Transfer Problems</h3>
<table width="800">
<tr>
<td width="250"><b>Company</b>
<td width="150"><b>Source System</b></td>
<td width="50"><b>Doc. Ctrl Num</b></td>
<td width="50"><b>Amount</b></
<td width="50"><b>Vendor Code</b></td>
<td width="250"><b>Transfer Error</b></td>
</tr>
<cfloop query="qry_APcompanies">
<cfquery name="qry_APTransferErrors
select distinct doc_ctrl_num, convert( varchar, dateadd(dd,(date_doc-69359
from #qry_APcompanies.db_name#.
where chg.trx_ctrl_num = e.vcTrxCtrlNum
and doc_ctrl_num not in (select doc_ctrl_num from #qry_APcompanies.db_name#.
and mw_processed_date is null
and amt_gross <> 0
order by 1
</cfquery>
<cfset coname = #qry_APcompanies.company_n
<cfloop query="qry_APTransferError
<cfoutput query="qry_APTransferError
<tr>
<td>#coname#</td>
<td>#mw_source_system#</td
<td><a href="dsp_APTransferDetail
<td>#DollarFormat(amt_gros
<td>#vendor_code#</td>
<td>#vcMessage#</td>
</tr>
</cfoutput>
</cfloop>
</cfloop>
</table>
<!---Cool---->
<h3>A/P Source System to Epicor Reconciliation</h3>
<cfquery name="qry_sourceMissing" datasource="core">
select 'Right Angle' as source_system, InvoiceNumber as invoice_number,
(select BANme from [mwdevsv14\RightAngle].Rig
(select BANme from [mwdevsv14\RightAngle].Rig
InvoiceDate as statement_date, InvoiceAmount as total_value, FedDate as fed_date
from [mwdevsv14\RightAngle].Rig
where InvoiceAmount <> 0
and InvoiceDate > '1/1/05'
and InternalBAID not in (631, 607, 375, 401) -- these are the SWBU companies that don't end up in RA
and Matched = 'Y'
and status <> 'H'
and Status <> 'P'
<!--- and PybleHdrTmplteID <> 901 --->
and InvoiceNumber not in
(select doc_ctrl_num from MWHydrocarbon..aptrxage
union select doc_ctrl_num from MWHydrocarbon..mw_apinpchg
union select doc_ctrl_num from MWEnergyAppal..mw_apinpchg
union select doc_ctrl_num from MWMichigan..mw_apinpchg
union select doc_ctrl_num from MLPWestShore..mw_apinpchg
union select doc_ctrl_num from Matrex..mw_apinpchg)
order by 1, InvoiceDate, InvoiceNumber
</cfquery>
<table width="800">
<tr>
<td width="100"><b>Source System</b></td>
<td width="120"><b>Company</b>
<td width="50"><b>Vendor</b></
<td width="50"><b>Doc. Ctrl Num</b></td>
<td width="50"><b>Amount</b></
<td width="50"><b>Statement Date</b></td>
</tr>
<cfoutput query="qry_sourceMissing">
<tr>
<td>#source_system#</td>
<td>#internal_company#</td
<td>#customer_company#</td
<td>#invoice_number#</td>
<td>#DollarFormat(total_va
<td>#dateformat(statement_
</tr>
</cfoutput>
</table>
</form>
<cf_footer>
I've taken out every cfoutput with the exception of two. Please help get this is easy problem fix.
ASKER
It throws the error at this line:
<cfset source = '#selectSource#'>
The error is:
source = #selectSource
Could not get the parameter value due to:
mispelling OR the query attribute is not defined right.
It something to do with the cfoutput in the file so I took almost all them out so someone could tell me where I should put them properly.
<cfset source = '#selectSource#'>
The error is:
source = #selectSource
Could not get the parameter value due to:
mispelling OR the query attribute is not defined right.
It something to do with the cfoutput in the file so I took almost all them out so someone could tell me where I should put them properly.
ASKER
Here is my code with the cfoutputs in it:
<!--- Secure this page! --->
<!--- Ensure that you list the correct url of this page in the "This Page" variable. --->
<cfset ThisPage = "/markwest/accounting_fina nce/FinAcc tng/dsp_AP PostingSum mary.cfm">
<cfinclude template="/markwest/blocks /SecurePag e.cfm">
<!--- End Secure this page! --->
<cf_header title="Epicor A/P Posting Summary" showDateJS="yes">
<cfinclude template="/markwest/blocks /dsp_Page_ Navigation .cfm">
<cfif not isdefined("url.source")>
<cfset url.source = "All">
</cfif>
<cfset batch_amount = 0>
<cfset batch_count = 0>
<cfset last_company = "">
<cfset last_type = "">
<cfset last_source = "">
<cfset source = "#selectSource#">
<cfquery name="qry_APcompanies" datasource="core">
select company_name, db_name
from pltmaster..smcomp
where company_id in (select company_id from pltmaster..smperm where app_id = 4000)
and company_id not in (6,16)
order by 1
</cfquery>
<h2>Epicor A/P Posting Summary</h2>
<form name="FormMain" action=#thisPage# method="post">
<h3>A/P Records to Post</h3>
<table width="850" border="0">
<tr>
<td>
<select name="selectSource" onchange="document.searchf orm.submit ();">
<cfif #source# eq "All">
<option value="All" selected>All
<cfelse>
<option value="All" >All
</cfif>
<cfif #source# eq "Right Angle">
<option value="Right Angle" selected>Right Angle
<cfelse>
<option value="Right Angle">Right Angle
</cfif>
<cfif #source# eq "Expense Reporting">
<option value="Expense Reporting" selected>Expense Reporting
<cfelse>
<option value="Expense Reporting">Expense Reporting
</cfif>
</select>
</td>
</tr>
<tr><tr><td><input type="Submit" name="makeReport" value="Make Report"</tr></tr></td>
<tr>
<td width="200"><b>Company</b> </td>
<td width="100"><b>Source System</b></td>
<td width="50"><b>Trans. Ctrl Num</b></td>
<td width="75"><b>Doc. Ctrl Num</b></td>
<td width="75"><b>Trans Type</b></td>
<td width="50"><b>Amount</b></ td>
<td width="125"><b>Vendor</b>< /td>
<td width="25"><b>Hold Flag</b></td>
<td width="50"><b>Transfer Date</b></td>
</tr>
<cfloop query="qry_APcompanies">
<cfquery name="qry_APToPost" datasource="core">
<cfif '#selectSource#' eq "Right Angle">
select isNull(m.mw_source_system, 'Epicor') as mw_source_system, i.trx_ctrl_num, i.doc_ctrl_num, i.vendor_code, a.address_name,t.trx_type_ desc, i.amt_gross, m.mw_processed_date, i.hold_flag
from #qry_APcompanies.db_name#. .apinpchg i, #qry_APcompanies.db_name#. .mw_apinpc hg m, #qry_APcompanies.db_name#. .aptrxtyp t, #qry_APcompanies.db_name#. .apmaster a
where i.trx_ctrl_num = m.trx_ctrl_num
and i.trx_type = t.trx_type
and i.vendor_code = a.vendor_code
and a.address_type = 0
and mw_source_system = '#selectSource#'
order by 2
<cfelseif '#selectSource#' eq "Expense Reporting">
select isNull(m.mw_source_system, 'Epicor') as mw_source_system, i.trx_ctrl_num, i.doc_ctrl_num, i.vendor_code, a.address_name,t.trx_type_ desc, i.amt_gross, m.mw_processed_date, i.hold_flag
from #qry_APcompanies.db_name#. .apinpchg i, #qry_APcompanies.db_name#. .mw_apinpc hg m, #qry_APcompanies.db_name#. .aptrxtyp t, #qry_APcompanies.db_name#. .apmaster a
where i.trx_ctrl_num = m.trx_ctrl_num
and i.trx_type = t.trx_type
and i.vendor_code = a.vendor_code
and a.address_type = 0
and mw_source_system = '#selectSource#'
order by 2
<cfelse>
select isNull(m.mw_source_system, 'Epicor') as mw_source_system, i.trx_ctrl_num, i.doc_ctrl_num, i.vendor_code, a.address_name,t.trx_type_ desc, i.amt_gross, m.mw_processed_date, i.hold_flag
from #qry_APcompanies.db_name#. .apinpchg i, #qry_APcompanies.db_name#. .mw_apinpc hg m, #qry_APcompanies.db_name#. .aptrxtyp t, #qry_APcompanies.db_name#. .apmaster a
where i.trx_ctrl_num = m.trx_ctrl_num
and i.trx_type = t.trx_type
and i.vendor_code = a.vendor_code
and a.address_type = 0
</cfif>
</cfquery>
<cfset coname = #qry_APcompanies.company_n ame#>
<cfloop query="qry_APToPost">
<cfif #batch_count# eq "0">
<cfset last_company = #coname#>
<cfset last_type = #qry_APToPost.trx_type_des c#>
<cfset last_source = #mw_source_system#>
</cfif>
<cfif #last_company# neq #coname# or #last_type# neq #trx_type_desc# or #last_source# neq #mw_source_system#>
<cfoutput query = "qry_APtoPost">
<tr>
<td><strong>Total</strong> </td>
<td></td>
<td></td>
<td></td>
<td><strong>#batch_count# #last_type#(s)</strong></t d>
<td><strong>#DollarFormat( batch_amou nt)#</stro ng></td>
<td></td>
<td></td>
<td></td>
</tr>
</cfoutput>
<cfset batch_amount = 0>
<cfset batch_count = 0>
<cfset last_company = #coname#>
<cfset last_source = #mw_source_system#>
</cfif>
<cfoutput query = "qry_APtoPost">
<tr>
<td>#coname#</td>
<td>#mw_source_system#</td >
<td>#trx_ctrl_num#</td>
<td>#doc_ctrl_num#</td>
<td>#trx_type_desc#</td>
<td>#DollarFormat(amt_gros s)#</td>
<td>#address_name#</td>
<td>#hold_flag#</td>
<td>#dateformat(mw_process ed_date, "mm/dd/yy")#</td>
</tr>
</cfoutput>
<cfset batch_amount = #batch_amount# + #amt_gross#>
<cfset batch_count = #batch_count# + 1>
</cfloop>
<cfoutput query="qry_APToPost">
<tr>
<td><strong>Total</strong> </td>
<td></td>
<td></td>
<td></td>
<td><strong>#batch_count# #last_type#(s)</strong></t d>
<td><strong>#DollarFormat( batch_amou nt)#</stro ng></td>
<td></td>
<td></td>
<td></td>
</tr>
</cfoutput>
</cfloop>
</table>
<!---Cool---->
<h3>A/P Transfer Problems</h3>
<table width="800">
<tr>
<td width="250"><b>Company</b> </td>
<td width="150"><b>Source System</b></td>
<td width="50"><b>Doc. Ctrl Num</b></td>
<td width="50"><b>Amount</b></ td>
<td width="50"><b>Vendor Code</b></td>
<td width="250"><b>Transfer Error</b></td>
</tr>
<cfloop query="qry_APcompanies">
<cfquery name="qry_APTransferErrors " datasource="core">
select distinct doc_ctrl_num, convert( varchar, dateadd(dd,(date_doc-69359 6),'1900/0 1/01'), 101 ) as 'date_doc', trx_type, apply_to_num, <!---apply_trx_type, --->convert(numeric(10,2), amt_gross) amt_gross, vendor_code, pay_to_addr1, mw_source_system, tiSeverity, vcMessage, vcSource
from #qry_APcompanies.db_name#. .mw_apinpc hg chg, #qry_APcompanies.db_name#. .mw_errors e
where chg.trx_ctrl_num = e.vcTrxCtrlNum
and doc_ctrl_num not in (select doc_ctrl_num from #qry_APcompanies.db_name#. .apinpchg union select doc_ctrl_num from #qry_APcompanies.db_name#. .apvohdr)
and mw_processed_date is null
and amt_gross <> 0
order by 1
</cfquery>
<cfset coname = #qry_APcompanies.company_n ame#>
<cfloop query="qry_APTransferError s">
<cfoutput query="qry_APTransferError s">
<tr>
<td>#coname#</td>
<td>#mw_source_system#</td >
<td><a href="dsp_APTransferDetail s.cfm?syst em=#mw_sou rce_system #&doc_num= #doc_ctrl_ num#">#doc _ctrl_num# </a></td>
<td>#DollarFormat(amt_gros s)#</td>
<td>#vendor_code#</td>
<td>#vcMessage#</td>
</tr>
</cfoutput>
</cfloop>
</cfloop>
</table>
<!---Cool---->
<h3>A/P Source System to Epicor Reconciliation</h3>
<cfquery name="qry_sourceMissing" datasource="core">
select 'Right Angle' as source_system, InvoiceNumber as invoice_number,
(select BANme from [mwdevsv14\RightAngle].Rig htAngleTes t.dbo.Busi nessAssoci ate where BAID = InternalBAID) as internal_company,
(select BANme from [mwdevsv14\RightAngle].Rig htAngleTes t.dbo.Busi nessAssoci ate where BAID = ExternalBAID) as customer_company,
InvoiceDate as statement_date, InvoiceAmount as total_value, FedDate as fed_date
from [mwdevsv14\RightAngle].Rig htAngleTes t.dbo.Paya bleHeader SIH
where InvoiceAmount <> 0
and InvoiceDate > '1/1/05'
and InternalBAID not in (631, 607, 375, 401) -- these are the SWBU companies that don't end up in RA
and Matched = 'Y'
and status <> 'H'
and Status <> 'P'
<!--- and PybleHdrTmplteID <> 901 --->
and InvoiceNumber not in
(select doc_ctrl_num from MWHydrocarbon..aptrxage
union select doc_ctrl_num from MWHydrocarbon..mw_apinpchg
union select doc_ctrl_num from MWEnergyAppal..mw_apinpchg
union select doc_ctrl_num from MWMichigan..mw_apinpchg
union select doc_ctrl_num from MLPWestShore..mw_apinpchg
union select doc_ctrl_num from Matrex..mw_apinpchg)
order by 1, InvoiceDate, InvoiceNumber
</cfquery>
<table width="800">
<tr>
<td width="100"><b>Source System</b></td>
<td width="120"><b>Company</b> </td>
<td width="50"><b>Vendor</b></ td>
<td width="50"><b>Doc. Ctrl Num</b></td>
<td width="50"><b>Amount</b></ td>
<td width="50"><b>Statement Date</b></td>
</tr>
<cfoutput query="qry_sourceMissing">
<tr>
<td>#source_system#</td>
<td>#internal_company#</td >
<td>#customer_company#</td >
<td>#invoice_number#</td>
<td>#DollarFormat(total_va lue)#</td>
<td>#dateformat(statement_ date, "mm/dd/yy")#</td>
</tr>
</cfoutput>
</table>
</form>
<cf_footer>
<!--- Secure this page! --->
<!--- Ensure that you list the correct url of this page in the "This Page" variable. --->
<cfset ThisPage = "/markwest/accounting_fina
<cfinclude template="/markwest/blocks
<!--- End Secure this page! --->
<cf_header title="Epicor A/P Posting Summary" showDateJS="yes">
<cfinclude template="/markwest/blocks
<cfif not isdefined("url.source")>
<cfset url.source = "All">
</cfif>
<cfset batch_amount = 0>
<cfset batch_count = 0>
<cfset last_company = "">
<cfset last_type = "">
<cfset last_source = "">
<cfset source = "#selectSource#">
<cfquery name="qry_APcompanies" datasource="core">
select company_name, db_name
from pltmaster..smcomp
where company_id in (select company_id from pltmaster..smperm where app_id = 4000)
and company_id not in (6,16)
order by 1
</cfquery>
<h2>Epicor A/P Posting Summary</h2>
<form name="FormMain" action=#thisPage# method="post">
<h3>A/P Records to Post</h3>
<table width="850" border="0">
<tr>
<td>
<select name="selectSource" onchange="document.searchf
<cfif #source# eq "All">
<option value="All" selected>All
<cfelse>
<option value="All" >All
</cfif>
<cfif #source# eq "Right Angle">
<option value="Right Angle" selected>Right Angle
<cfelse>
<option value="Right Angle">Right Angle
</cfif>
<cfif #source# eq "Expense Reporting">
<option value="Expense Reporting" selected>Expense Reporting
<cfelse>
<option value="Expense Reporting">Expense Reporting
</cfif>
</select>
</td>
</tr>
<tr><tr><td><input type="Submit" name="makeReport" value="Make Report"</tr></tr></td>
<tr>
<td width="200"><b>Company</b>
<td width="100"><b>Source System</b></td>
<td width="50"><b>Trans. Ctrl Num</b></td>
<td width="75"><b>Doc. Ctrl Num</b></td>
<td width="75"><b>Trans Type</b></td>
<td width="50"><b>Amount</b></
<td width="125"><b>Vendor</b><
<td width="25"><b>Hold Flag</b></td>
<td width="50"><b>Transfer Date</b></td>
</tr>
<cfloop query="qry_APcompanies">
<cfquery name="qry_APToPost" datasource="core">
<cfif '#selectSource#' eq "Right Angle">
select isNull(m.mw_source_system,
from #qry_APcompanies.db_name#.
where i.trx_ctrl_num = m.trx_ctrl_num
and i.trx_type = t.trx_type
and i.vendor_code = a.vendor_code
and a.address_type = 0
and mw_source_system = '#selectSource#'
order by 2
<cfelseif '#selectSource#' eq "Expense Reporting">
select isNull(m.mw_source_system,
from #qry_APcompanies.db_name#.
where i.trx_ctrl_num = m.trx_ctrl_num
and i.trx_type = t.trx_type
and i.vendor_code = a.vendor_code
and a.address_type = 0
and mw_source_system = '#selectSource#'
order by 2
<cfelse>
select isNull(m.mw_source_system,
from #qry_APcompanies.db_name#.
where i.trx_ctrl_num = m.trx_ctrl_num
and i.trx_type = t.trx_type
and i.vendor_code = a.vendor_code
and a.address_type = 0
</cfif>
</cfquery>
<cfset coname = #qry_APcompanies.company_n
<cfloop query="qry_APToPost">
<cfif #batch_count# eq "0">
<cfset last_company = #coname#>
<cfset last_type = #qry_APToPost.trx_type_des
<cfset last_source = #mw_source_system#>
</cfif>
<cfif #last_company# neq #coname# or #last_type# neq #trx_type_desc# or #last_source# neq #mw_source_system#>
<cfoutput query = "qry_APtoPost">
<tr>
<td><strong>Total</strong>
<td></td>
<td></td>
<td></td>
<td><strong>#batch_count# #last_type#(s)</strong></t
<td><strong>#DollarFormat(
<td></td>
<td></td>
<td></td>
</tr>
</cfoutput>
<cfset batch_amount = 0>
<cfset batch_count = 0>
<cfset last_company = #coname#>
<cfset last_source = #mw_source_system#>
</cfif>
<cfoutput query = "qry_APtoPost">
<tr>
<td>#coname#</td>
<td>#mw_source_system#</td
<td>#trx_ctrl_num#</td>
<td>#doc_ctrl_num#</td>
<td>#trx_type_desc#</td>
<td>#DollarFormat(amt_gros
<td>#address_name#</td>
<td>#hold_flag#</td>
<td>#dateformat(mw_process
</tr>
</cfoutput>
<cfset batch_amount = #batch_amount# + #amt_gross#>
<cfset batch_count = #batch_count# + 1>
</cfloop>
<cfoutput query="qry_APToPost">
<tr>
<td><strong>Total</strong>
<td></td>
<td></td>
<td></td>
<td><strong>#batch_count# #last_type#(s)</strong></t
<td><strong>#DollarFormat(
<td></td>
<td></td>
<td></td>
</tr>
</cfoutput>
</cfloop>
</table>
<!---Cool---->
<h3>A/P Transfer Problems</h3>
<table width="800">
<tr>
<td width="250"><b>Company</b>
<td width="150"><b>Source System</b></td>
<td width="50"><b>Doc. Ctrl Num</b></td>
<td width="50"><b>Amount</b></
<td width="50"><b>Vendor Code</b></td>
<td width="250"><b>Transfer Error</b></td>
</tr>
<cfloop query="qry_APcompanies">
<cfquery name="qry_APTransferErrors
select distinct doc_ctrl_num, convert( varchar, dateadd(dd,(date_doc-69359
from #qry_APcompanies.db_name#.
where chg.trx_ctrl_num = e.vcTrxCtrlNum
and doc_ctrl_num not in (select doc_ctrl_num from #qry_APcompanies.db_name#.
and mw_processed_date is null
and amt_gross <> 0
order by 1
</cfquery>
<cfset coname = #qry_APcompanies.company_n
<cfloop query="qry_APTransferError
<cfoutput query="qry_APTransferError
<tr>
<td>#coname#</td>
<td>#mw_source_system#</td
<td><a href="dsp_APTransferDetail
<td>#DollarFormat(amt_gros
<td>#vendor_code#</td>
<td>#vcMessage#</td>
</tr>
</cfoutput>
</cfloop>
</cfloop>
</table>
<!---Cool---->
<h3>A/P Source System to Epicor Reconciliation</h3>
<cfquery name="qry_sourceMissing" datasource="core">
select 'Right Angle' as source_system, InvoiceNumber as invoice_number,
(select BANme from [mwdevsv14\RightAngle].Rig
(select BANme from [mwdevsv14\RightAngle].Rig
InvoiceDate as statement_date, InvoiceAmount as total_value, FedDate as fed_date
from [mwdevsv14\RightAngle].Rig
where InvoiceAmount <> 0
and InvoiceDate > '1/1/05'
and InternalBAID not in (631, 607, 375, 401) -- these are the SWBU companies that don't end up in RA
and Matched = 'Y'
and status <> 'H'
and Status <> 'P'
<!--- and PybleHdrTmplteID <> 901 --->
and InvoiceNumber not in
(select doc_ctrl_num from MWHydrocarbon..aptrxage
union select doc_ctrl_num from MWHydrocarbon..mw_apinpchg
union select doc_ctrl_num from MWEnergyAppal..mw_apinpchg
union select doc_ctrl_num from MWMichigan..mw_apinpchg
union select doc_ctrl_num from MLPWestShore..mw_apinpchg
union select doc_ctrl_num from Matrex..mw_apinpchg)
order by 1, InvoiceDate, InvoiceNumber
</cfquery>
<table width="800">
<tr>
<td width="100"><b>Source System</b></td>
<td width="120"><b>Company</b>
<td width="50"><b>Vendor</b></
<td width="50"><b>Doc. Ctrl Num</b></td>
<td width="50"><b>Amount</b></
<td width="50"><b>Statement Date</b></td>
</tr>
<cfoutput query="qry_sourceMissing">
<tr>
<td>#source_system#</td>
<td>#internal_company#</td
<td>#customer_company#</td
<td>#invoice_number#</td>
<td>#DollarFormat(total_va
<td>#dateformat(statement_
</tr>
</cfoutput>
</table>
</form>
<cf_footer>
Assuming selectSource is text, try changing
<cfset source = '#selectSource#'>
to
<cfset source = "#selectSource#">
Generally, single and double quotes are pretty interchangeable in CF, but sometimes CF acts quirky...
<cfset source = '#selectSource#'>
to
<cfset source = "#selectSource#">
Generally, single and double quotes are pretty interchangeable in CF, but sometimes CF acts quirky...
ASKER
Nope, that doesn't work either.
Looking a little closer at your code, you have this clump of cfsets:
<cfset batch_amount = 0>
<cfset batch_count = 0>
<cfset last_company = "">
<cfset last_type = "">
<cfset last_source = "">
<cfset source = "#selectSource#">
But nowhere prior is #selectsource# defined. Where is this value supposed to be coming from?
<cfset batch_amount = 0>
<cfset batch_count = 0>
<cfset last_company = "">
<cfset last_type = "">
<cfset last_source = "">
<cfset source = "#selectSource#">
But nowhere prior is #selectsource# defined. Where is this value supposed to be coming from?
ASKER
The selectSource is a value coming from a drop down box. Here is the code for that:
<select name="selectSource" onchange="document.searchf orm.submit ();">
<cfif #source# eq "All">
<option value="All" selected>All
<cfelse>
<option value="All" >All
</cfif>
<cfif #source# eq "Right Angle">
<option value="Right Angle" selected>Right Angle
<cfelse>
<option value="Right Angle">Right Angle
</cfif>
<cfif #source# eq "Expense Reporting">
<option value="Expense Reporting" selected>Expense Reporting
<cfelse>
<option value="Expense Reporting">Expense Reporting
</cfif>
</select>
<select name="selectSource" onchange="document.searchf
<cfif #source# eq "All">
<option value="All" selected>All
<cfelse>
<option value="All" >All
</cfif>
<cfif #source# eq "Right Angle">
<option value="Right Angle" selected>Right Angle
<cfelse>
<option value="Right Angle">Right Angle
</cfif>
<cfif #source# eq "Expense Reporting">
<option value="Expense Reporting" selected>Expense Reporting
<cfelse>
<option value="Expense Reporting">Expense Reporting
</cfif>
</select>
Just for laughs, lets change
<cfset source = "#selectSource#">
to
<cfset source = "ALL">
and see if we get an error.
<cfset source = "#selectSource#">
to
<cfset source = "ALL">
and see if we get an error.
ASKER
Yhea, it start giving me an error on this line:
'#selectSource#' eq "Right Angle"
Error resolving parameter SELECTSOURCE
ColdFusion was unable to determine the value of the parameter. This problem is very likely due to the fact that either:
You have misspelled the parameter name, or
You have not specified a QUERY attribute for a CFOUTPUT, CFMAIL, or CFTABLE tag.
'#selectSource#' eq "Right Angle"
Error resolving parameter SELECTSOURCE
ColdFusion was unable to determine the value of the parameter. This problem is very likely due to the fact that either:
You have misspelled the parameter name, or
You have not specified a QUERY attribute for a CFOUTPUT, CFMAIL, or CFTABLE tag.
oops, I did that backwards from the way I MEANT to do it. Put the last line back and above it, ADD this line:
<cfset selectsource="ALL">
Sorry about that. Bottom line, I think you may not be passing in a value for that variable from your form...
<cfset selectsource="ALL">
Sorry about that. Bottom line, I think you may not be passing in a value for that variable from your form...
ASKER
Same error.
Well, is my form select statement wrong then. It doesn't seem wrong.
<select name="selectSource" onchange="document.searchf orm.submit ();">
<cfif #source# eq "All">
<option value="All" selected>All
<cfelse>
<option value="All" >All
</cfif>
<cfif #source# eq "Right Angle">
<option value="Right Angle" selected>Right Angle
<cfelse>
<option value="Right Angle">Right Angle
</cfif>
<cfif #source# eq "Expense Reporting">
<option value="Expense Reporting" selected>Expense Reporting
<cfelse>
<option value="Expense Reporting">Expense Reporting
</cfif>
</select>
Well, is my form select statement wrong then. It doesn't seem wrong.
<select name="selectSource" onchange="document.searchf
<cfif #source# eq "All">
<option value="All" selected>All
<cfelse>
<option value="All" >All
</cfif>
<cfif #source# eq "Right Angle">
<option value="Right Angle" selected>Right Angle
<cfelse>
<option value="Right Angle">Right Angle
</cfif>
<cfif #source# eq "Expense Reporting">
<option value="Expense Reporting" selected>Expense Reporting
<cfelse>
<option value="Expense Reporting">Expense Reporting
</cfif>
</select>
The problem is, you are using the variable above where it is defined.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Cool, thanks man. Now I know what to do. It's weird though because in other CF pages that I have written i didn't have to pass a parameter like that.
Not positive, but <cfelseif '#selectSource#'eq "Expense Reporting"> might supposed to have a space in it like so:
<cfelseif '#selectSource#' eq "Expense Reporting">