Click here to Skip to main content
16,021,125 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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
Posted

Try this.

crystalReport.Load(Server.MapPath("CR.rpt"));
 
Share this answer
 
C#
cryrpt.Load("D:\new\CDP\CrystalReport1.rpt");


insted of this try this..

C#
 cryrpt.Load(@"D:\new\CDP\CrystalReport1.rpt");

OR

 cryrpt.Load("D:\\new\\CDP\\CrystalReport1.rpt");



you got error becuse of \

for more detail on escap sequence please see this..

http://msdn.microsoft.com/en-us/library/h21280bw.aspx[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900