本文介绍了如何加载水晶报表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
To load a crystal report, in the button click I did the codeing. but when I try to execute this a error is shown as unrecognized escape sequence.coding is done asReportDocument cryrpt = new ReportDocument();
cryrpt.Load("D:\new\CDP\CrystalReport1.rpt");
CrystalReportViewer1.ReportSource=cryrpt;
CrystalReportViewer1.RefreshReport();
pls help me to correct this
推荐答案
cryrpt.Load("D:\new\CDP\CrystalReport1.rpt");
对此进行了尝试..
insted of this try this..
cryrpt.Load(@"D:\new\CDP\CrystalReport1.rpt");
OR
cryrpt.Load("D:\\new\\CDP\\CrystalReport1.rpt");
您因为\
而出错
有关escap序列的更多详细信息,请参见此..
http://msdn.microsoft.com/en-us/library/h21280bw.aspx [ ^ ]
you got error becuse of \
for more detail on escap sequence please see this..
http://msdn.microsoft.com/en-us/library/h21280bw.aspx[^]
crystalReport.Load(Server.MapPath("CR.rpt"));
这篇关于如何加载水晶报表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!