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

Color specific rows in detail section

New Here ,
Mar 17, 2010 Mar 17, 2010

Hi,

   I would like to color a particular row in the detail section based on some values in the query.

For ex. I have 5 rows displayed, I would like to color the 3rd in red and the 5th row in green. My color code for red or green is in the query itself which renders the details section. I see a way to color the whole detail section but not a row.

Has someone attempted to do this in CF8, or is it even possible.

Thanks all for your time.

TOPICS
Reporting
579
Translate
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
New Here ,
Mar 17, 2010 Mar 17, 2010

Hi all,

  Figured out a solution.

Place as many colored rectangle boxes over the column names and use the print when condition..property. If the query column has a color of red, print the red color box. Also make sure the query field name transparency value to transparent.

Thanks

Translate
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
New Here ,
Mar 21, 2010 Mar 21, 2010
LATEST

usually i use this way to display different color for each detail...

hope it wil help...

<cfoutput query="RS_DATA_ROW">

        <tr>

          <cfset vi =  #RS_DATA_ROW.currentrow#>

          <CFSET V1 = TRIM(#RS_DATA_ROW.FIELD_1#)>

          <CFSET V2 = TRIM(#RS_DATA_ROW.FIELD_2#)>

            <cfset classJive = "blue">

            <cfif #vi# mod 2 eq 0 >

              <cfset classJive = "white">

            </cfif>

            <td valign="top" bgcolor="#classJive#">#V1#</td>

            <td valign="top" bgcolor="#classJive#"><div align="right">#V2#</div></td>

 

        </tr>

</cfoutput>

Translate
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