水晶报告不显示 [英] Crystal report not display
本文介绍了水晶报告不显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经在visul studeio 2012代码中创建了这样的水晶报告,我的问题就是我打电话给这个报告。报告不显示。我累了哪个问题。给我解决方案
Aspx =======
I have create crystal report in visul studeio 2012 code like this and my problem is when i call this report. report not display. which problem i am tired. give me solution
Aspx=======
<CR:CrystalReportViewer ID="crpt_print" ReportSourceID="CrystalReportSource1" runat="server" AutoDataBind="true" />
<CR:CrystalReportSource ID="CrystalReportSource1" runat="server"></CR:CrystalReportSource>
CS ============ >
public ReportDocument rpt = new ReportDocument();
protected void Page_Load(object sender, EventArgs e)
{
rpt.FileName = "C:\\Users\\rasmikantm\\Desktop\\aaa\\CrystalReport.rpt";
crpt_print.ReportSource = rpt;
rpt.Load("C:\\Users\\rasmikantm\\Desktop\\aaa\\CrystalReport.rpt");
}
推荐答案
试试这个
Try this
public ReportDocument rpt = new ReportDocument();
protected void Page_Load(object sender, EventArgs e)
{
rpt.FileName = "C:\\Users\\rasmikantm\\Desktop\\aaa\\CrystalReport.rpt";
rpt.Load("C:\\Users\\rasmikantm\\Desktop\\aaa\\CrystalReport.rpt");
CrystalReportSource1.ReportSource = rpt;
}
CrystalReportSource1是您的CrystalReportViewerID。
"CrystalReportSource1" is your CrystalReportViewerID .
这不起作用因为CrystalReportSource1不允许ReportSource属性
this is not working because CrystalReportSource1 not allow ReportSource property
这篇关于水晶报告不显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文