使用Windows窗体将参数传递给crystal report [英] Passing parameters to crystal report by using Windows form

查看:83
本文介绍了使用Windows窗体将参数传递给crystal report的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想通过使用Windows窗体控件(例如 comboBox和两个datetimePicker 控件)将两个参数,即医生姓名和订单日期传递给水晶报表范围。有可能,请帮帮我。当用户运行水晶报告时,首先他会选择医生姓名(comboBox)和两个日期(datetimePicker1和datetimePicker2)。

I want to pass two parameters namely: Doctor Name and Date of Order to a crystal report by using windows form control such as a comboBox and two datetimePicker controls for date range. Is it possible, please help me. When the user will run the crystal report, first he will select Doctor Name(comboBox) and two dates(datetimePicker1 and datetimePicker2).

推荐答案

请看这些:

在运行时将参数传递给Crystal Reports [ ^ ]

http://social.msdn.microsoft.com/Forums/en-US/vscrystalreports/thread/c244aa5e-2736-4fb2-a998-c655815a24b8/ [ ^ ]

http://social.msdn.microsoft.com/Forums/en-US/vsreportcontrols/thread/71b10940-a7cc-41a2-bd2c-81eaaed41cbf/ [ ^ ]
Please, see these:
Passing Parameters to Crystal Reports at Runtime[^]
http://social.msdn.microsoft.com/Forums/en-US/vscrystalreports/thread/c244aa5e-2736-4fb2-a998-c655815a24b8/[^]
http://social.msdn.microsoft.com/Forums/en-US/vsreportcontrols/thread/71b10940-a7cc-41a2-bd2c-81eaaed41cbf/[^]


form1 c = new form1();

c.crystalReportViewer1.ShowCloseButton = true;

c.MdiParent = this.MdiParent;

crystalreport1 id = new crystalreport1();





id。 RecordSelectionFormula ={DrTable.Drname} ='+ cmbboc.text +'其中Datetimepicker1> =#+ dtfrom.Text +#和Datetimepicker2< =#+ dtto.Text +#)



c.crystalReportViewer1.ReportSource = id;

//id.crystalReportViewer1.Refresh();

c.Show();
form1 c = new form1 ();
c.crystalReportViewer1.ShowCloseButton = true;
c.MdiParent = this.MdiParent;
crystalreport1 id = new crystalreport1 ();


id.RecordSelectionFormula = "{DrTable.Drname}='" + cmbboc.text + "' where Datetimepicker1>=#" + dtfrom.Text + "# and Datetimepicker2<=#" + dtto.Text + "# )

c.crystalReportViewer1.ReportSource = id;
//id.crystalReportViewer1.Refresh();
c.Show();


你为什么要重新提问? :'(



加载水晶报告而不提供参数 [ ^ ]

水晶报告的参数 [ ^ ]
Why are you reposting questions? :'(

Loading a crystal report without giving parametrs[^]
Parameters to a crystal report[^]


这篇关于使用Windows窗体将参数传递给crystal report的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆