Hello team kindly assist me resolve this error am getting, I develop small c# window application with visual studio 2013 with rdlc Reportview and ssms server, the application display the reportview well but when I publish the application as exe file the ReportView doesn't show and this the error I get
An error occurred during local report processing
The report definition for report 'Report1' has not been specified
Could not find a part of the path 'C:\Users\Emmafk\AppData\Local\Apps\2.0\VSEN29NZ.NLV
Emmmanuel FIADUFEPosted Sep 7, 2021, 6:45 PM
Hello Patel, thanks for the response,
the below code is what i use in my print reportview and it work well but when i deploy the application and i tried to print some data that is the error i get, thanks.
}
public void LoadMembers()
{
try
{
ReportDataSource rptDataSource;
this.reportViewer1.LocalReport.ReportPath = Application.StartupPath + @"\Report\Report1.rdlc";
this.reportViewer1.LocalReport.DataSources.Clear();
DataSet1 ds =new DataSet1();
SqlDataAdapter da = new SqlDataAdapter();
cn.Open();
da.SelectCommand = new SqlCommand("select JoinDate, MembershipNo, FName, LName, ContactNo, DOB, Gender, Location from tblMembers where FName like '%" + f.txtMSearch.Text + "%'", cn);
da.Fill(ds.Tables["dtMembers"]);
rptDataSource = new ReportDataSource("DataSet1", ds.Tables["dtMembers"]);
reportViewer1.LocalReport.DataSources.Add(rptDataSource);
reportViewer1.SetDisplayMode(Microsoft.Reporting.WinForms.DisplayMode.PrintLayout);
reportViewer1.ZoomMode = ZoomMode.Percent;
reportViewer1.ZoomPercent = 100;
cn.Close();
}catch(Exception ex)
{
cn.Close();
MessageBox.Show(ex.Message);
}
}
Pankajkumar PatelPosted Sep 7, 2021, 6:27 AM
Hi Emmmanuel FIADUFE,
File is not showing C# ReportView can be resolved as following:
replace this line in your report view
to this line
For more detail you can refer below article:
Hope, this will help you!