如何在水晶报表中传递数据集中的参数 [英] How to pass parameter in dataset in crystal report
本文介绍了如何在水晶报表中传递数据集中的参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
我面对带有参数和数据集的编程,并且可以同时将参数和数据设置为水晶报告。
我的代码是:
Hi All,
I facing prog with parameter and dataset, and it possible to parameter and data set to crystal report at a same time.
My Code is:
SqlDataAdapter da = new SqlDataAdapter("select distinct st.EmpNameC, st.Dated,st.ShiftGroupC from ShiftTable as st inner join ClientDeployment as cd on st.EmpCodeC=cd.EmpCodeC where st.dated ='03/Oct/2014' and cd.LocationC='J1' and st.EmpnameC='prasanna'", cnn);
DataSet ds = new DataSet();
da.Fill(ds);
CryRpt.SetDataSource(ds.Tables[0]);
crystalReportViewer1.ReportSource = CryRpt;
crystalReportViewer1.Refresh();
// Parameter Value
RptDoc.SetParameterValue("date1", "01/10/2014");
这里我想使用参数值和那个查询来传递水晶报告它可以告诉我
here i want use parameter value and that query to pass crystal report it possible kindly tell me
推荐答案
您能查看以下链接
http://stackoverflow.com/questions/19930121/steps-to-pass-parameters-to-crystal-reports-in-c-sharp [ ^ ]
传递参数到运行时的Crystal Reports [ ^ ]
Can you check the below links
http://stackoverflow.com/questions/19930121/steps-to-pass-parameters-to-crystal-reports-in-c-sharp[^]
Passing Parameters to Crystal Reports at Runtime[^]
这篇关于如何在水晶报表中传递数据集中的参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文