有如下代码:
Crpe.ReportTitle:='销售订单';
Crpe.ReportName:=GlobalVar.AppPath+'\Reports\crp_SalesOrder.rpt';
Crpe.ParamByName('@sOrder#','').ShowDialog:=False;
Crpe.ParamByName('@sOrder#','').PromptValue:=Self.sOrderID;
Crpe.ParamByName('@sOrder#','').CurrentValue:=Self.sOrderID;
Crpe.Refresh;
Crpe.Execute;
每次执行,都要弹出对话框要求输入参数值,虽然输入框默认的参数值已经是传过去的参数值了, 可是它非得让确认一次, 烦死了. 请问有谁能有办法解决?
问题主要出在Crpe.Refresh语句上, 可是如果不要这条语句, 报表根本就不能正确显示.
Crpe.ReportTitle:='销售订单';
Crpe.ReportName:=GlobalVar.AppPath+'\Reports\crp_SalesOrder.rpt';
Crpe.ParamByName('@sOrder#','').ShowDialog:=False;
Crpe.ParamByName('@sOrder#','').PromptValue:=Self.sOrderID;
Crpe.ParamByName('@sOrder#','').CurrentValue:=Self.sOrderID;
Crpe.Refresh;
Crpe.Execute;
每次执行,都要弹出对话框要求输入参数值,虽然输入框默认的参数值已经是传过去的参数值了, 可是它非得让确认一次, 烦死了. 请问有谁能有办法解决?
问题主要出在Crpe.Refresh语句上, 可是如果不要这条语句, 报表根本就不能正确显示.
解决方案 »
- GZIP解压缩的问题,我用的是ZLIP,但总是报DATA ERROR的错误
- DELPHI动态链接ACCESS数据库
- 谁在第二书店买国书,怎么三天了还没有送到货?
- 请问VC中的CString s;i=0xef;s.Format("%02x",i);在dephi中该怎么实现?谢谢
- 菜鸟的关于DELPHI疑问
- 关于打印机的消息处理
- 关于combobox控件的问题。
- 如何获得的本机器的ip地址,通过程序?谢谢
- 如何改变一个文本框中某一行的文字的颜色!急急急!!!!!!!!!!!!!
- 用NMUDP从自己的机器连续发数据包给自己,为什么收到的包数和发送的包数不同?
- DevExpress QuantumGrid 5.0 安装在D6的问题?
- 世上有99%以上的人还没发现!(希望去试验过的都回帖,谢谢)不错。刚试过。
Crpe.ReportName:=GlobalVar.AppPath+'\Reports\crp_SalesOrder.rpt';
Crpe.ParamFields.AllowDialog:=False; //这句是按你所说的加上去的
//Crpe.ParamByName('@sOrder#','').ShowDialog:=False; //这句是我原来用的
Crpe.ParamByName('@sOrder#','').PromptValue:=Self.sOrderID;
Crpe.ParamByName('@sOrder#','').CurrentValue:=Self.sOrderID;
Crpe.Refresh;
Crpe.Execute;
Crpe.ReportName:=GlobalVar.AppPath+'\Reports\crp_SalesOrder.rpt';
Crpe.ParamFields.AllowDialog:=False; //这句是按你所说的加上去的
//Crpe.ParamByName('@sOrder#','').ShowDialog:=False; //这句是我原来用的
Crpe.ParamByName('@sOrder#','').PromptValue:=Self.sOrderID;
Crpe.ParamByName('@sOrder#','').CurrentValue:=Self.sOrderID;
//Crpe.Refresh; //去掉这条语句就行了, 否则, 预览报表时,永远都是显示设计时的数据!!! 原因未明
Crpe.Execute;