I installed my windows form application on another computer and this happens when the reports is opened. Everything works fine on my computer only getting an error for other computers.
The error for other computers:
Here is the unhandled exception:
// THIS IS MY CODE
if (con.State == ConnectionState.Open)
con.Close();
try
{
con.Open();
string SelectQuery = "SELECT * FROM tblProject";
SqlCommand command = new SqlCommand(SelectQuery, con);
SqlDataAdapter DataAdapt = new SqlDataAdapter(command);
DataSet MyDataset = new DataSet();
DataAdapt.Fill(MyDataset, "tblProject");
ProjectDataReport ProjectReport = new ProjectDataReport();
ProjectReport.SetDataSource(MyDataset);
con.Close();
crv1.ReportSource = ProjectReport;
crv1.Refresh();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message, "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error);
crv1.Refresh();
}
finally
{
con.Close();
}