delphifastreporttdbgrid

how to color specific rows of a table in fastreport


i have a table month I marked the weekend days with other colors in DBGrid (OnDrawcolumnCell)

if (ADOQ1days.Value = 'Friyday') OR (ADOQ1days.Value = 'Saturday') then
begin
  DBGrid2.Canvas.Brush.Color := $0053FFFF ;
  DBGrid2.DefaultDrawDataCell(Rect, Column.Field,State);
end;

i want to keep this color when printing the report

enter image description here


Solution

  • What you are looking for is Conditional highlighting

    You might also learn more about conditional highlighting from How to use Conditional Highlighting and Sums with FastReport video.