fastreport打印stringgrid的问题(200)

K

kingwsl

Unregistered / Unconfirmed
GUEST, unregistred user!
fastreport打印stringgrid时,参考了fastreport的demo,但发现其例子中的stringgrid填的都是数字,如果改成字符,例如在每个数字后面加个'i',则程序报错,错误是:无法将string转换为double,难道CrossObject中只能填数字?但我要打印的都是文字,请问该怎么处理??谢谢,代码procedure TForm1.frxReport1BeforePrint(Sender: TfrxReportComponent);var Cross: TfrxCrossView;
i, j: Integer;
begin
if sender is TfrxCrossView then
begin
if sender.Name='Cross1'then
begin
Cross:= TfrxCrossView(sender);
for i := 1 to 10do
for j := 1 to 10do
Cross.AddValue(, [j], [red][StringGrid1.Cells[i - 1, j - 1]][/red]);
end;
end;
end;
 
可以改一下设置
 
默认是sum,修改cell为none。
 

Similar threads

S
回复
0
查看
956
SUNSTONE的Delphi笔记
S
S
回复
0
查看
778
SUNSTONE的Delphi笔记
S
S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
顶部