Hi, I am unsure why I am getting this error "Invalid report file path"
Image url: https://www.dropbox.com/s/zudkbb442u73e1j/Invalid%20Report%20File%20Path.JPGdl=0
I am 100% sure that the report is in the correct path, I even tried to put the entire path (e.g. C:\Users\IAmTheUser\Desktop\MyProject\Reports\MyReport.rpt
Here is my code:
ReportDocument rptDoc = new ReportDocument();
string strRptLoad = Server.MapPath("../Reports/MyReport.rpt");
rptDoc.Load(strRptLoad);
//rptDoc.Load("C:\\Users\\IAmTheUser\\Desktop\\MyProject\\Reports\\MyReport.rpt");
DataSetPrintAll.spSelectReimbursePrintAllDataTable dt = new DataSetPrintAll.spSelectReimbursePrintAllDataTable();
dtPrintAllAdapter printAdapter = new dtPrintAllAdapter();
dt = printAdapter.GetData(transactionNo);
DataSet ds = new DataSet();
ds.Tables.Add(dt);
rptDoc.SetDataSource(ds);
crPrint.ReportSource = rptDoc;
crPrint.DataBind();
crPrint.DocumentView = CrystalDecisions.Shared.DocumentViewType.PrintLayout;
crPrint.Dispose();
Edited by tiamsicb - 03 Nov 2016 at 12:58pm