frxCrossView
Setting Dimensions | Rows to 1 and the following code:
procedure TForm1.frxReport1BeforePrint(Sender: TfrxReportComponent);
var
Cross: TfrxCrossView;
begin
if sender is TfrxCrossView then
begin
Cross := TfrxCrossView(sender);
with Cross do
begin
oratable1.First;
while not oratable1.Eof do
begin
AddValue([oratable1.fields[1].AsString],[oratable1.FieldByName('ename').asString] , [FloatToStr(oratable1.FieldByName('number').asFloat)]);
oratable1.Next;
end;
end;
end;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
frxReport1.ShowReport;
end;
delphi show erro:
could not convert variant of type (string) into type (double)
procedure TForm1.frxReport1BeforePrint(Sender: TfrxReportComponent);
var
Cross: TfrxCrossView;
begin
if sender is TfrxCrossView then
begin
Cross := TfrxCrossView(sender);
with Cross do
begin
oratable1.First;
while not oratable1.Eof do
begin
AddValue([oratable1.fields[1].AsString],[oratable1.FieldByName('ename').asString] , [FloatToStr(oratable1.FieldByName('number').asFloat)]);
oratable1.Next;
end;
end;
end;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
frxReport1.ShowReport;
end;
delphi show erro:
could not convert variant of type (string) into type (double)
Comments
work fine, but i want to sum for the cell