C#,Crystal Report和存储过程 [英] C#, Crystal Report and Stored Procedure

查看:101
本文介绍了C#,Crystal Report和存储过程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我对如何使用

C#在Crystal Reports中集成存储过程毫无头绪。有什么指示吗?


谢谢

Lalit

Hi,
I am clueless on how to integrate stored procedure in Crystal Reports using
C#. Any pointers please?

Thanks
Lalit

推荐答案

不确定存储过程,但您可以使用proc填充

DataSet,然后使用dataset.WriteXML(SomeFile.xml)。这样做一次只需要生成文件
。然后,您可以使用该第一个文件来使用CR Report

设计器。然后,只需重新创建XML文件,然后调用报告。

Lalit Parashar < LA **** @ mapleusa.com.NOSPAM>在留言中写道

新闻:%2 **************** @ TK2MSFTNGP12.phx.gbl ...
Not sure about the Stored Proc, but you can use the proc to populate a
DataSet then use dataset.WriteXML("SomeFile.xml"). Do this once just to
generate the file. Then, you can use that first file to use the CR Report
designer. Afterward, just recreate the XML file and then call the report.
"Lalit Parashar" <la****@mapleusa.com.NOSPAM> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...

我对如何使用C#在Crystal Reports
中集成存储过程毫无头绪。有什么指示吗?

谢谢
Lalit
Hi,
I am clueless on how to integrate stored procedure in Crystal Reports using C#. Any pointers please?

Thanks
Lalit



只需使用存储的proc检索DataSet然后将该DataSet

传递给文档的DataSource属性。这样的事情:


....

ds = _currencyProcessor.GetCashLedgerReportData(Currenc ySortOrder.BySlot,


dtpCurRptOptFromDate.Value,


cbCurRptOptSessionOnly.Checked).DataSet;


oRD = new Currency_CashLedger();

oRD.SetParameterValue(" SessionOnly",cbCurRptOptSessionOnly.Checked);


oRD.SetParameterValue(" RoomNumber",_currConfig.LocationID.ToString());


oRD.SetParameterValue(" Name",_ Name);


oRD.SetParameterValue(" TransactionDate",dtpCurRptOptFromDate.Value);


oRD.SetDataSource(ds.Tables [0]);


crystalReportViewer2.ReportSource = oRD;


....


Scott

Just retrieve the DataSet using the stored proc and then pass that DataSet
to your document''s DataSource property. Something like this:

....
ds = _currencyProcessor.GetCashLedgerReportData(Currenc ySortOrder.BySlot,

dtpCurRptOptFromDate.Value,

cbCurRptOptSessionOnly.Checked).DataSet;

oRD = new Currency_CashLedger();

oRD.SetParameterValue("SessionOnly", cbCurRptOptSessionOnly.Checked);

oRD.SetParameterValue("RoomNumber", _currConfig.LocationID.ToString());

oRD.SetParameterValue("Name", _Name);

oRD.SetParameterValue("TransactionDate", dtpCurRptOptFromDate.Value);

oRD.SetDataSource(ds.Tables[0]);

crystalReportViewer2.ReportSource = oRD;

....

Scott

我对如何在Crystal Reports $ b中集成存储过程毫无头绪$ b使用C#。有什么指示吗?
I am clueless on how to integrate stored procedure in Crystal Reports using C#. Any pointers please?



嗨Lalit


看看 http://www.crystalreportsbook.com/ 在那里你会找到所有你需要的信息

特别是第14章

希望这个帮助,


-

Ignacio Machin,

ignacio.machin AT dot.state.fl.us

佛罗里达州交通部


" Lalit Parashar" < LA **** @ mapleusa.com.NOSPAM>在留言中写道

新闻:%2 **************** @ TK2MSFTNGP12.phx.gbl ...
Hi Lalit

Take a look at http://www.crystalreportsbook.com/ there you will find ALL
the info you need, especially the chapter 14

Hope this help,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Lalit Parashar" <la****@mapleusa.com.NOSPAM> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...

我对如何使用C#在Crystal Reports
中集成存储过程毫无头绪。有什么指示吗?

谢谢
Lalit
Hi,
I am clueless on how to integrate stored procedure in Crystal Reports using C#. Any pointers please?

Thanks
Lalit



这篇关于C#,Crystal Report和存储过程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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