set displayformat for frxCrossObject

edited 5:38PM in FastReport VCL 5
How to format frxCrossObject in fastreport,
i dont know how to get access cell memo,
from demo PrintTable, i want set number format if field is numeric runtime
wrote:
procedure TForm1.frxReportTableOriginalBeforePrint(Sender: TfrxReportComponent);
var
Cross: TfrxCrossView;
tmp : TfrxCustomMemoView;
i, j: Integer;
begin
if Sender is TfrxCrossView then
begin
Cross := TfrxCrossView(Sender);

FTabel.First;
i := 0;
while not FTabel.Eof do
begin
for j := 0 to FTabel.Fields.Count - 1 do
begin
Cross.AddValue(, [FTabel.Fields[j].DisplayLabel], [FTabel.Fields[j].Value]);
if FTabel.Fields[j] is TNumericField then
begin
tmp := Cross.CellMemos[j]; //

> FAILED
tmp.HAlign := haRight;
TfrxFormat(tmp.DisplayFormat).DecimalSeparator := ',';
TfrxFormat(tmp.DisplayFormat).Kind := fkNumeric;
TfrxFormat(tmp.DisplayFormat).FormatStr := '%2.0n';
end;
end;

FTabel.Next;
Inc(i);
end;
end;
end;

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.