Thank you, Razzak, but I must bu doing something wrong, 'cause it doesn't
work so far.
I have to mention that the report has a subreport in its detail band.
So, do I put the shape and the before generate code on the detail band in
the main report or in the subreport ?
I suppose it would be the latter ....
--------------------------------------------------
From: "A. Razzak Memon" <[email protected]>
Sent: Wednesday, June 30, 2010 4:40 PM
To: "RBASE-L Mailing List" <[email protected]>
Subject: [RBASE-L] - Re: zebra stripes on reports
At 10:14 AM 6/30/2010, Luc Delcoigne wrote:
i have a report and I want to print the detail lines with
a "zebra" stripe pattern, in a color of my choice.
How to do this is obvious for forms, but I haven't sorted
out yet how to do this on a report.
I suppose it will also be something simple......
Luc,
Take a look at the "ZebraStyleReport" included with the RRBYW16
to understand a simple but eloquent technique to use Zebra Style
Band in Reports.
Technically:
01. Place a "Shape" object to cover the entire Detail Band.
Use the Fill Color and Line Color as "White"
Assign a Component ID, such as: ZebraBand
Send to Back
02. Assign a "common" Component ID for all DB/Var Objects on
the Detail Band, such as: FontControl
03. Now pre-define a global variable as "On Before Generate"
Report Action
-- Report Action: On Before Generate
-- Pre-Define Variables
SET VAR vCounter INTEGER = NULL
04. Use the following code as "Before Generate Custom EEP"
for Report Detail Band
-- Report Band: Detail
-- Before Generate Custom EEP
IF vCounter = 0 THEN
SET VAR vCounter = 1
PROPERTY ZebraBand BRUSH_COLOR 'SILVER'
PROPERTY FontControl FONT_COLOR 'BLACK'
ELSE
SET VAR vCounter = 0
PROPERTY ZebraBand BRUSH_COLOR 'WHITE'
PROPERTY FontControl FONT_COLOR 'BLACK'
ENDIF
RETURN
And, here's a sample report to illustrate the use of such
technique.
http://www.rbase.com/rbg90/reports/ZebraStyleReport.pdf
Hope that helps!
Very Best R:egards,
Razzak.