DB-Cross - How to change text print in a cell

Hi!
I don't know if it is possible, but I would like to change the memo text and color in a cell under specific condition.
In few words I have a cross table where the cells contain a string data. I would like to "reduce" the width of the cells showing only a single letter of this string (I don't want to change the database's value, but only what is print).

To change the color I used this procedure:

<!--fonto:Courier New--><span style="font-family:Courier New"><!--/fonto-->procedure DBCross1OnPrintCell(Memo: TfrxMemoView; RowIndex, ColumnIndex, CellIndex: Integer;
RowValues, ColumnValues, Value: String);
begin
if Value = '1-Low' then
Memo.Color := clGreen;
if Value = '2-Middle' then
Memo.Color := clYellow;
if Value = '3-High' then
Memo.Color := clRed;
end;<!--fontc--></span><!--/fontc-->

and it works great.


To change the text visualized I don't know what to do.

In another report where I used a simple memo, I used this function:
<!--fonto:Courier New--><span style="font-family:Courier New"><!--/fonto-->Copy(<myvariable>,3,1)<!--fontc--></span><!--/fontc-->
and it works.

But in the case of a DBCross's cell I can't use this solution.

Anyone know what to do?

Sorry for my english.
Thanks

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 7:22PM
    run the main demo and look at the expressions in the cross report

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.