At 02:00 PM 4/7/2011, Lawrence Lustig wrote:

I'm using PROPERTY myRegion BRUSH_COLOR 'SILVER' to implement
a form of complex zebra striping in the a report.

The problem is that I want to use a really light grey color,
lighter than SILVER, GRAY, or even LIGHT GRAY. I can set the
color I want from the "custom colors" box.  But is it possible
to set that color through the PROPERTY command (eg, using RGB
values or something in place of the color name)?


Did you know that you can use the RGB or Color Number instead
of typical color name when defining OPTION BRUSH_COLOR value?

As an example, if you wish to use "Web Light Gray" color, you
can use the following options:

BRUSH_COLOR [R211,G211,B211]
BRUSH_COLOR 13882323
BRUSH_COLOR WEBLIGHTGREY

Here's how:

01. Start R:BASE eXtreme 9.1 (32/64)

02. Open the report in Report Designer

03. While in Report Designer:

    Use the following PROPERTY Command as "On Before Custom EEP"
    for [Detail] band.

    -- Dynamic Zebra Style
    -- Example 01

    IF vCounter  = 0 THEN
      SET VAR vCounter = 1
      PROPERTY ZebraBand BRUSH_COLOR [R211,G211,B211]
      PROPERTY FontControl FONT_COLOR 'BLACK'
    ELSE
      SET VAR vCounter = 0
      PROPERTY ZebraBand BRUSH_COLOR 'WHITE'
      PROPERTY FontControl FONT_COLOR 'BLACK'
    ENDIF
    RETURN

    -- Dynamic Zebra Style
    -- Example 02
    IF vCounter  = 0 THEN
      SET VAR vCounter = 1
      PROPERTY ZebraBand BRUSH_COLOR 13882323
      PROPERTY FontControl FONT_COLOR 'BLACK'
    ELSE
      SET VAR vCounter = 0
      PROPERTY ZebraBand BRUSH_COLOR 'WHITE'
      PROPERTY FontControl FONT_COLOR 'BLACK'
    ENDIF
    RETURN

    -- Dynamic Zebra Style
    -- Example 03
    IF vCounter  = 0 THEN
      SET VAR vCounter = 1
      PROPERTY ZebraBand BRUSH_COLOR WEBLIGHTGREY
      PROPERTY FontControl FONT_COLOR 'BLACK'
    ELSE
      SET VAR vCounter = 0
      PROPERTY ZebraBand BRUSH_COLOR 'WHITE'
      PROPERTY FontControl FONT_COLOR 'BLACK'
    ENDIF
    RETURN

04. If implemented correctly, the report should look like this:

    http://www.razzak.com/tips/RRBYW17_ZebraStyleReport.pdf

Tip:

    For a complete list of "Colors" and "Extended Colors", press
    [F3] key to obtain Color Name, Integer Value, and RGB Value.

Very Best R:egards,

Razzak.


Reply via email to