Alternating Background Color By Wrapped Line

The ALTBACKPERLINE attribute alternates the background color by line for reports that use positioned drivers, for example PDF, DHTML, PPT, and PPTX. This enables you to wrap a long field value, and alternate the background color of each line for that value, independent of borders. In order to apply alternating background color per line, you need to explicitly add the SET ALTBACKPERLINE=ON command to procedures that use WRAP.

Reference: Alternate Background Color By Wrapped Line

SET ALTBACKPERLINE = {ON|OFF}

where:

ON

Alternates background color by line.

OFF

Alternates background color by row. This is the default value.

Example: Alternating Background Color By Wrapped Line

The following report request prints a COMPUTE field with a long line of text, using WRAP and without using the SET ALTBACKPERLINE command. The default alternating background color is applied by row.

TABLE FILE WF_RETAIL PRINT
COMPUTE LONG_LINE/A1000 = 'This is a very long line of data, set up so that'
                           |'it wraps onto the next line within a report'
                           |'and to test the alternate color syntax'
                           |'in style sheets.';
BY PRODUCT_CATEGORY BY PRODUCT_SUBCATEG BY MODEL
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET PAGE OFF
ON TABLE SET STYLE *
UNITS=IN, PAGESIZE='A4', LEFTMARGIN=0.19, TOPMARGIN=0.00, BOTTOMMARGIN=0.00, SQUEEZE=ON, ORIENTATION=LANDSCAPE, $
TYPE=REPORT, FONT='ARIAL', SIZE=8, COLOR=BLACK, BACKCOLOR='NONE', STYLE=NORMAL, $
TYPE=REPORT, COLUMN=N4, WRAP=1, $
TYPE=DATA, COLUMN=N4, BACKCOLOR=(RGB(235 240 178) RGB(255 255 255)), $
ENDSTYLE
END

The output is:

With the SET ALTBACKPERLINE=ON command added to the request, the alternating background color is applied by line, as shown in the following output.