procedure TForm1.ppDetailBand1BeforePrint(Sender: TObject); begin if ((ppReport1.DataPipeline.RecordNo mod 2) = 0) then ppShape1.Brush.Color := clBlue else ppShape1.Brush.Color := clAqua; end;
In RAP, you can do the following, however, Report.CachePages would need to be set to true otherwise the colors may change as you move backwards through the report.
if (Shape1.Brush.Color = clAqua) then Shape1.Brush.Color := clBlue else Shape1.Brush.Color := clAqua;
Another alternative is to create a RAP pass through function to surface the RecordNo property value for a given pipeline.
Comments
In Delphi code, the way to do it would be:
procedure TForm1.ppDetailBand1BeforePrint(Sender: TObject);
begin
if ((ppReport1.DataPipeline.RecordNo mod 2) = 0) then
ppShape1.Brush.Color := clBlue
else
ppShape1.Brush.Color := clAqua;
end;
In RAP, you can do the following, however, Report.CachePages would need to
be set to true otherwise the colors may change as you move backwards through
the report.
if (Shape1.Brush.Color = clAqua) then
Shape1.Brush.Color := clBlue
else
Shape1.Brush.Color := clAqua;
Another alternative is to create a RAP pass through function to surface the
RecordNo property value for a given pipeline.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com