public void Print() { if (physicalGridView.FocusedRowHandle < 0) { return; } phyReportSet.RecNo = phyMainSet.RecNo; phyReportSet.Select(); phyReportSet.DataSet.Tables[0].TableName = "P1"; phyReportSet.DataSet.Tables[1].TableName = "P2"; phyReportSet.DataSet.Tables[2].TableName = "P3"; phyReportSet.DataSet.Tables[3].TableName = "P40"; phyReportSet.DataSet.Tables[4].TableName = "P41"; phyReportSet.DataSet.Tables[5].TableName = "P5"; phyReportSet.DataSet.Tables[6].TableName = "Image"; BindingSource bind = new BindingSource(); bind.DataSource = phyReportSet.DataSet; XtraReport report; if (phyMainSet.AreaNo == EReportArea.US) { report = new ReportUsPhysical(); } else { report = new ReportEuPhysical(); } report.DataSource = bind; report.CreateDocument(); new ReportPrintTool(report); DialogReportPreview dialog = new DialogReportPreview(); dialog.Source = report; dialog.ShowDialog(); }
public void Print() { if (chemicalGridView.FocusedRowHandle < 0) { return; } cheReportSet.RecNo = cheMainSet.RecNo; cheReportSet.Select(); cheReportSet.DataSet.Tables[0].TableName = "P1"; cheReportSet.DataSet.Tables[1].TableName = "P2"; cheReportSet.DataSet.Tables[2].TableName = "P2EXTEND"; cheReportSet.DataSet.Tables[3].TableName = "Image"; BindingSource bind = new BindingSource(); bind.DataSource = cheReportSet.DataSet; XtraReport report; if (cheMainSet.AreaNo == EReportArea.US) { report = new ReportUsChemical(); } else { report = new ReportEuChemical(); } report.DataSource = bind; report.CreateDocument(); new ReportPrintTool(report); DialogReportPreview dialog = new DialogReportPreview(); dialog.Source = report; dialog.ShowDialog(); }