• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Math Problem

New Here ,
Oct 03, 2019 Oct 03, 2019

Copy link to clipboard

Copied

I have a report that compares one figure against the total of several figures and compares them. If they are the same, they print in black. If the one figure is more than the total of the several figures, the output prints in red. If the one figure is less than the total of the several figures, the output prints in green. (The CF file is attached as a docx.)

 

The report currently outputs 49 pairs of figures. Eight of those pairs, in all cases of which the figures are the same, print in the wrong colors, three in red and five in green. The other 41 pairs, comprising  several in all three possibilities, print correctly.

 

Any ideas? Thanks.

 

 

-Dale

Views

146

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 04, 2019 Oct 04, 2019

Copy link to clipboard

Copied

LATEST

 

 

 

 

 

 

The only odd thing I see is:

 

 

 

 

<cfoutput>
  <tr style="display:none">
     <td>
      #cPayable#
     </td>
     <cfset FFPTotal = FFPTotal + #cPayable# />
  </tr>
</cfoutput>

 

 

 

 

It is odd for 2 reasons:

1) it has 1 <td> instead of 2.

2) it incorrectly adds a cfoutput tag within a cfoutput tag.

 

Was it your intention to do this instead:

 

 

 <tr style="display:none">
<td>
 &nbsp;
 </td>
 <td>
 #cPayable#
  </td>
</tr>
<cfset FFPTotal = FFPTotal + #cPayable# />
          

 

 

 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation