We are having many clients that are running our program on Windows 7 64 bit platforms, our program that displays the report hangs our program when the user closes the report. I ran the latest SP9 and SP10 on the workstation and it still has the problem.
Windows 7 64 bit operating system.
Windows Form Application
I have wrote a very simple application and have isolated the problem to the dispose method.
DataSet ds = newDataSet();
DataTable dt = newDataTable("FRUIT");
DataColumn dc = newDataColumn("Type");
dt.Columns.Add(dc);
dc = newDataColumn("Color");
dt.Columns.Add(dc);
DataRow dr = dt.NewRow();
dr["Type"] = "Apple";
dr["Color"] = "Red";
dt.Rows.Add(dr);
dt.AcceptChanges();
ds.Tables.Add(dt);
CrystalReport2 RPT2 = newCrystalReport2();
RPT2.SetDataSource(ds);
crystalReportViewer1.ReportSource = RPT2;
if (crystalReportViewer1.ReportSource isCrystalReport2) // check if valid reference
{
CrystalReport2 rpt = crystalReportViewer1.ReportSource asCrystalReport2;
rpt.Database.Tables.Dispose();//When code reaches this point, the program locks up and freezes.
rpt.Database.Dispose();
rpt.Dispose();
}
crystalReportViewer1.Dispose();
crystalReportViewer1 = null;
this.Close();