change text in show title and show corner

If your put the settings show titles and show corner on in crosstab, the name of the column headers occurs.
I want to change these values to values from my dataset before printing the crosstab.

The helpfile talks about this:
procedure Cross1OnPrintColumnHeader(Memo: TfrxMemoView;
                HeaderIndexes, HeaderValues, Value: Variant);
begin
if (HeaderIndexes[0] = 0) and (HeaderIndexes[1] = 2) then
   Memo.Color := clRed;
end;
But this is not changing the title and corners.

How will I do that?


Comments

  • gpigpi
    edited 11:20AM
    Your code works OK for me
    See attach
  • edited October 2013
    That's not what I ment
    The code is working oke, but I want to change the caption of the cell.
    I think that the procedure 'Cross1OnPrintColumnHeader(Memo: TfrxMemoView; HeaderIndexes, HeaderValues, Value: Variant)' is the one I need, but it will not change the caption of the cell.

    [edit]
    This is my solution:
    procedure DBCross1OnPrintColumnHeader(Memo: TfrxMemoView; HeaderIndexes, HeaderValues, Value: Variant);
    begin
     if trim(Memo.text) = 'week' then
       memo.text := <frxDBDataset1."tweek">;
    end;
    

    It's not a nice one.

    [/edit]

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.