conditional formatting a cross report

My cross report shows a student to each row and the potental and estimated grade for each subject as the columns.

I want to colour a cell red if it is less than (alphabetically) than the one to the right of it. (i have thre students and six columns of dayta on my dummy table)

I am expreimenting with the folowing

procedure DBCross1OnPrintCell(Memo: TfrxMemoView; RowIndex, ColumnIndex, CellIndex: Integer; RowValues, ColumnValues, Value: Variant);
begin

//showmessage ('this cell = ' + vartostr(value));
// showmessage ('next cell = ' + vartostr(columnvalues[rowindex]));
if ((columnindex mod 2) = 1) then
if varToStr(value) > varToStr(ColumnValues[Columnindex+1]) then
memo.color :=clred;
end;

but don't seem to be able to refer to any other columnvalue index than 0.

How do I refer to other cells in the same row as the current cell?

Howard

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.