我如何显示crystel报告? [英] How can i display a crystel report ?
本文介绍了我如何显示crystel报告?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我如何显示水晶报告?
我创建了一个报告(添加新项目 - >水晶报告)现在我要显示它。
怎么样?我这样做了吗?
我用一种新形式创建了一个crystelreportviewer。但我不知道crystelreportviewer。
有什么用?如何将我的报告与crystelreportviewer连接?它就像一个按钮吗?
如果我点击它会重定向到报告屏幕正确吗?
请帮助......
How can i display crystal report?
I have created one report (add new item->crystal report) now i want to display that.
How can i do this?
I have created one crystelreportviewer in one new form.But i don''t know about crystelreportviewer.
What is the use of it? how can i connect my report with crystelreportviewer ?is it like a button?
if i click it it will redirect to report screen correct?
Please help...
推荐答案
你已经用了很多语言...你将使用哪种语言...
这是VB.Net中的一个例子
http://vb.net-informations.com/crystal-report/vb.net_crystal_report_step_by_step.htm [ ^ ]
you have taged so many languages...in which language you are going to do..
here is an example in VB.Net
http://vb.net-informations.com/crystal-report/vb.net_crystal_report_step_by_step.htm[^]
嗨...
使用Visual Studio 2010中的Crystal Reports生成报告 [ ^ ]
看到此链接,可能对u。
谢谢。
Hi...
Generate a Report using Crystal Reports in Visual Studio 2010[^]
see this link, may be useful to u.
thank u.
//调用存储过程或任何其他返回结果集的方法,例如
// GetReportData()
DataSet dsReport = GetReportData();
//创建ReportDocument实例
ReportDocument reportDoc = new ReportDocument();
//设置报告文件名,即服务器上的RPT文件位置
reportDoc.Load(reportFileName);
//设置从GetReportData()方法检索的数据源
reportDoc.SetDataSource(dsNew);
//分配给水晶报告查看器。 crptViewer是CrystalReportViewer的实例
//在aspx页面或ascx用户控件上
crptViewer.ReportSource = reportDoc;
crptViewer.RefreshReport();
//Invoke stored procedure or any other method that returns the resultset e.g.
//GetReportData()
DataSet dsReport = GetReportData();
//create ReportDocument instance
ReportDocument reportDoc = new ReportDocument();
//set the report file name i.e your RPT file location on the server
reportDoc.Load(reportFileName);
//set the data source you retrieved from GetReportData() method
reportDoc.SetDataSource(dsNew);
//assign to crystal report viewer. crptViewer is the instance of CrystalReportViewer
//on aspx page or ascx user control
crptViewer.ReportSource = reportDoc;
crptViewer.RefreshReport();
这篇关于我如何显示crystel报告?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文