+1 800 256 3608 (toll-free in North America) or +49 7531 90 60 10| service@combit.com

CrossTab Column background change problem

(Guest) #1

Hello Everyone

I would like to point at issue of changing background of column in crosstab.
Mentioned crosstab is generated from table attendance.


Table structure:

EmpID - Number
ReasonOfAbsent - Text
DateOfAbsent - Text


RowLines - EmpID
Columns - DateOfAbsent
CrossCell(data) - ReasonOfAbsent


Everything goes fine, but there is problem to highlight columns, which corespond with Weekend so Saturday and Sunday with other color.
I have written a formula to detect weekdays but in preview mode it is without effect.

Formula to change background color of cell (whole column):

Cond(Dow(tb.DateOfAbsent) = 6 OR Dow(tb.DateOfAbsent) = 7,LL.Color.Green, LL.Color.White)

Do you have any suggestions?


Note: Could it be a bug? The is no problem to highlite concrete cell or line (or odd line) but whole column there is. I do not understand.

(Guest) #2

I am sorry. I have forgotten to give a version. It is the newest L&L.

(Guest) #3

Well, crosstab cell’s properties are evaluated after all data is defined (that is, at the LlPrintFieldsEnd()'s time, not at the times the data for the cells (LlPrintFields()) is defined. So you cannot use your fields for anything except the call value itself, as the value is the same for all cells…

But you might use the LL.Crosstab.Xxxx functions for such purposes:

if (Crosstab.Row$(0) == “Sa” or Crosstab.Row$(0) == “Su”,LL.Color.Red,LL.Color.White)