使用VS 2013在Crystal Report Viewer中不显示Crystal报表 [英] Crystal Report Is Not Showing In Crystal Report Viewer Using VS 2013

查看:89
本文介绍了使用VS 2013在Crystal Report Viewer中不显示Crystal报表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨!

我是Crystal Reports的新手,我有一些问题。我正在使用ASP.NET 4.5使用VS2012。我创建了Crystal Report但没有在Crystal Report Viewer中显示,它显示了空白页面。

Crystal Report数据源和报告参数每件事情都顺利但是当我转到报告查看器页面时,它只显示空白页面。



这是代码





Hi!
I am New to Crystal Reports, and I have some issue. I am working with ASP.NET 4.5 Using VS2012. I have created the Crystal Report but that is not showing in the Crystal Report Viewer, It shows the blank page.
Crystal Report Data Source and Report Parameter every thing goes well but when i go to the report viewer page it shows nothing only the blank page.

Here is the Code


ReportDocument rpt = new ReportDocument();

rpt.Load(Server.MapPath("ReportEngine.rpt"));

CrystalReportViewer1.ReportSource = rpt;

rpt.SetDatabaseLogon("sa", "123");

ReportDataSet DS = new ReportDataSet();

using (SqlConnection con = new SqlConnection(System.Configuration.ConfigurationManager.AppSettings["DbConnectionString"]))
{
con.Open();
string query = "SELECT ID As Column1,NameEn As Column2, NameAr As Column3, Email As Column4, Email As Column5";

SqlCommand cmd = new SqlCommand(query, con);
SqlDataAdapter adapter = new SqlDataAdapter(query, con);
adapter.Fill(DS, "ReportTable");
rpt.SetDataSource(DS);
}
string[] cols = { "ID", "NameEn", "NameAr", "Email", "Email" };

for (int i = 0; i < cols.Length; i++)
{
rpt.SetParameterValue(i, cols[i].ToString());
}
CrystalReportViewer1.ReportSource = rpt;







先谢谢




Thanks in Advance

推荐答案

这个问题的可能解决方案。

Crystal Reports:避免空白页面 [ ^ ]

水晶报告 - 神秘的空白页 [ ^ ]

Crystal Report Blank /空/不显示。没有屏幕错误,但事件日志'ConfigurationErrorsException'收到 [ ^ ]
Here possible solutions for this issue.
Crystal Reports: Avoiding Blank Pages[^]
Crystal reports - Mysterious blank pages[^]
Crystal Report Blank / Empty / Not Displaying. No On-Screen Error, But Event Log ‘ConfigurationErrorsException’ Received[^]


这篇关于使用VS 2013在Crystal Report Viewer中不显示Crystal报表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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