Farbliche Hervorhebung der Werte

Navigation:  Bericht im FR-Designer > Kreuztabellen (Cross-tab Objekt) >

Farbliche Hervorhebung der Werte

Previous pageReturn to chapter overviewNext page

The user can adjust width and height of the tables rows and columns using the "OnCalcWidth" and "OnCalcHeight:" events handlers. Let us show how to increase width of the column, which corresponds to the 11th month of 1999 by the following example. To do this, create the "OnCalcWidth" events handler:

 

Pascal script:

 

procedure Cross1OnCalcWidth(ColumnIndex: Integer;

 ColumnValues: Variant; var Width: Extended);

begin

if (VarToStr(ColumnValues[0]) = '1999') and

   (VarToStr(ColumnValues[1]) = '11') then

   Width := 100;

end;

 

C++ Script:

 

void Cross1OnCalcWidth(

int ColumnIndex,

variant ColumnValues,

Extended &Width)

{

if ((VarToStr(ColumnValues[0]) == "1999") &&

   (VarToStr(ColumnValues[1]) = "11"))

   {

     Width = 100;

   }  

}

 

And the result would appear as follows:

 

_img204

 

In our example, to hide a column, it is enough to return the Width := 0. Note, that the sums are not recalculated at the same time, since the matrix is already full of values at this time.