Is it possible a CrossTab with text data?

Anu de DeusAnu de Deus Hampshire, UK
edited 2:55AM in FastReport 4.0
I want to create a grid with the CrossTab object, to print the contents of a stringgrid, but everytime the value of the cell is not numeric, it raises an exception.
Is there any way I can do this? I don't need to calculate any total or sub-total, just display plain text in the grid/cross-tab.

For example, from the demos, in the code below:

procedure TForm1.frxReport1BeforePrint(c: TfrxReportComponent);
var
Cross: TfrxCrossView;
i, j: Integer;
begin
if c is TfrxCrossView then
begin
Cross := TfrxCrossView©;
for i := 1 to 16 do
for j := 1 to 16 do
Cross.AddValue(, [j], [StringGrid1.Cells[i - 1, j - 1]]);
end;
end;

I'd like to have this line instead:
Cross.AddValue(, [j], );

Any ideas?
Alex

Comments

  • edited 2:55AM
    I want to create a grid with the CrossTab object, to print the contents of a stringgrid, but everytime the value of the cell is not numeric, it raises an exception.
    Is there any way I can do this? I don't need to calculate any total or sub-total, just display plain text in the grid/cross-tab.

    For example, from the demos, in the code below:

    procedure TForm1.frxReport1BeforePrint(c: TfrxReportComponent);
    var
    Cross: TfrxCrossView;
    i, j: Integer;
    begin
    if c is TfrxCrossView then
    begin
    Cross := TfrxCrossView?©;
    for i := 1 to 16 do
    for j := 1 to 16 do
    Cross.AddValue(, [j], [StringGrid1.Cells[i - 1, j - 1]]);
    end;
    end;

    I'd like to have this line instead:
    Cross.AddValue(, [j], );

    Any ideas?
    Alex

    Yourcrossname.CellFunctions[0]:=cfNone;

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.