阅读207 返回首页    go 小米 go 小米MIX


fastreport添加自定义变量Exception标识符未宣告

frxrprt1.Variables['提示'] := '打印空间不够,截取2行数据!';

打印或预览时Exception class Exception with message '标识符未宣告: '提示' .

网上方案:修改frxClass单元中 这个方法function TfrxReport.DoGetValue(const Expr: String; var Value: Variant): Boolean;源语句 if  Pos(#13#10, val) <> 0   then    修改后的语句  if  (Pos(#13#10, val) <> 0) or (ds=nil) then。

怕修改后出现其他问题(毕竟源码不是自己写的),而且要重新编译。

替换方案:添加一个数据集,向数据集添加字段 '提示' ,append值 '打印空间不够,截取2行数据! ',添加数据集到fastreport。

最后更新:2017-04-26 21:31:01

  上一篇:go Delphi中类似C中static变量的实现
  下一篇:go 预定义__cplusplus宏