Hi, Every One
I am getting error "Load Repot Fail" when i created the setup of my app.
I used following code
string strReportPath1 = strReportPath. Replace
("\\bin\\Debug" , "\\Forms\\Estimate" ) + "\\" + Estimate+ ".rpt";
Rpt.ShowReport( strReportPath1, ref crystalReportViewer 1, ref label1,
Ds);
-----------
public void ShowReport(string RptFileName, ref CrystalReportViewer
ReportViewerControl Name, ref System.Windows. Forms.Label
lblmsg,DataSet Ds)
{
try
{
ReportViewerControl Name.DisplayGrou pTree = false;
if((RptFileName != null && RptFileName != "") &&
(RptFileName. Contains( ".rpt")== true))
{
if (Ds.Tables[0] .Rows.Count > 0)
{
lblmsg.Text = "";
RptDoc.Load( RptFileName) ;
Ds.WriteXml( "Test.xml" );
RptDoc.SetDataSourc e(Ds);
ReportViewerControl Name.ReportSourc e =
RptDoc;
ReportViewerControl Name.Visible = true;
}
else
{
lblmsg.Text = "Data Not Found";
}
}
else
{
lblmsg.Text = "Report File Not Found.";
}
}
If is there any other way to set .rpt file path & work on setup then pls help me.
Thnx,