Hi,Could you please read the following code? Does this code robust?
we sometimes print empty report, does dt=null cause this problem?
internal C1.C1Report.C1Report _c1r = null;
DataTable dt = new DataTable(_c1r.ReportName);
//here put data into dt.
_c1r.DataSource.Recordset = dt.DefaultView;
dt = null;
_c1r.Document.PrinterSettings.PrinterName = _printerName;
_c1r.Document.Print();
|