public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { RpInGCN_MatTrong rpt = new RpInGCN_MatTrong(); rpt.Site = this.Site; return(rpt); }
private void printReport() { DataSet ds1 = new DataSet(); /*mCheckDoi ==1: Cap moi*/ if (mCheckDoi == 1) { #region Mat trong if (mIndex == 1) { if (mChungChiStatic == 1 || mChungChiStatic == 2) { RpInGCN_MatTrong rpt = new RpInGCN_MatTrong(); ds1 = bidingDataSet_Mattrong(); rpt.SetDataSource(ds1); InGcnViewer.ReportSource = rpt; InGcnViewer.ToolPanelView = ToolPanelViewType.None; this.InGcnViewer.RefreshReport(); } else if (mChungChiStatic == 3) { RpInGCN_MatTrong_DacBiet rpt = new RpInGCN_MatTrong_DacBiet(); ds1 = bidingDataSet_Mattrong(); rpt.SetDataSource(ds1); InGcnViewer.ReportSource = rpt; InGcnViewer.ToolPanelView = ToolPanelViewType.None; this.InGcnViewer.RefreshReport(); } else if (mChungChiStatic == 4) { Private_RpInGCN_MatTrong _rpt = new Private_RpInGCN_MatTrong(); ds1 = bidingDataSet_Mattrong(); _rpt.SetDataSource(ds1); InGcnViewer.ReportSource = _rpt; InGcnViewer.ToolPanelView = ToolPanelViewType.None; InGcnViewer.RefreshReport(); } else if (mChungChiStatic == 5) { Private_matTrong_Mau2 _rpt = new Private_matTrong_Mau2(); ds1 = bidingDataSet_Mattrong(); _rpt.SetDataSource(ds1); InGcnViewer.ReportSource = _rpt; InGcnViewer.ToolPanelView = ToolPanelViewType.None; InGcnViewer.RefreshReport(); } } //// In mat trong cua report //if (mIndex == 1) //{ // // // // Check cac chung chi do trung tam cap // if (mChungChiId == 31 || mChungChiId == 32 || mChungChiId == 33 || mChungChiId == 34 || mChungChiId == 14 || mChungChiId == 38 || mChungChiId == 39 || mChungChiId == 42) // { // Private_RpInGCN_MatTrong _rpt = new Private_RpInGCN_MatTrong(); // ds1 = bidingDataSet_Mattrong(); // _rpt.SetDataSource(ds1); // InGcnViewer.ReportSource = _rpt; // InGcnViewer.ToolPanelView = ToolPanelViewType.None; // InGcnViewer.RefreshReport(); // } // else // { // RpInGCN_MatTrong rpt = new RpInGCN_MatTrong(); // ds1 = bidingDataSet_Mattrong(); // rpt.SetDataSource(ds1); // InGcnViewer.ReportSource = rpt; // InGcnViewer.ToolPanelView = ToolPanelViewType.None; // this.InGcnViewer.RefreshReport(); // } //} #endregion #region Mat ngoai else if (mIndex == 2) { if (mChungChiStatic == 1 || mChungChiStatic == 2 || mChungChiStatic == 3) { RpInGCN_MatNgoai rpt = new RpInGCN_MatNgoai(); ds1 = bidingDataSet_Matngoai(); rpt.SetDataSource(ds1); InGcnViewer.ReportSource = rpt; InGcnViewer.ToolPanelView = ToolPanelViewType.None; this.InGcnViewer.RefreshReport(); } else if (mChungChiStatic == 4) { Private_RpInGCN_MatNgoai _rpt = new Private_RpInGCN_MatNgoai(); ds1 = bidingDataSet_Matngoai(); _rpt.SetDataSource(ds1); InGcnViewer.ReportSource = _rpt; InGcnViewer.ToolPanelView = ToolPanelViewType.None; this.InGcnViewer.RefreshReport(); } // DataSet ds1 = new DataSet(); //if (mChungChiId == 31 || mChungChiId == 32 || mChungChiId == 33 || mChungChiId == 34 || mChungChiId == 14 || mChungChiId == 38 || mChungChiId == 39 || mChungChiId == 42) //{ // Private_RpInGCN_MatNgoai _rpt = new Private_RpInGCN_MatNgoai(); // ds1 = bidingDataSet_Matngoai(); // _rpt.SetDataSource(ds1); // InGcnViewer.ReportSource = _rpt; // InGcnViewer.ToolPanelView = ToolPanelViewType.None; // this.InGcnViewer.RefreshReport(); //} //else //{ // RpInGCN_MatNgoai rpt = new RpInGCN_MatNgoai(); // ds1 = bidingDataSet_Matngoai(); // rpt.SetDataSource(ds1); // InGcnViewer.ReportSource = rpt; // InGcnViewer.ToolPanelView = ToolPanelViewType.None; // this.InGcnViewer.RefreshReport(); //} } #endregion } else if (mCheckDoi > 1) { #region Mat trong // In mat trong cua report if (mIndex == 1) { if (mChungChiStatic == 1 || mChungChiStatic == 2) { RpInGCN_MatTrong rpt = new RpInGCN_MatTrong(); //DataSet ds1 = new DataSet(); ds1 = bidingDataSet_Mattrong_Doi(); rpt.SetDataSource(ds1); //rpt.SetParameterValue("SoQT", mSoQT); InGcnViewer.ReportSource = rpt; InGcnViewer.ToolPanelView = ToolPanelViewType.None; this.InGcnViewer.RefreshReport(); } else if (mChungChiStatic == 3) { RpInGCN_MatTrong_DacBiet rpt = new RpInGCN_MatTrong_DacBiet(); //DataSet ds1 = new DataSet(); ds1 = bidingDataSet_Mattrong_Doi(); rpt.SetDataSource(ds1); //rpt.SetParameterValue("SoQT", mSoQT); InGcnViewer.ReportSource = rpt; InGcnViewer.ToolPanelView = ToolPanelViewType.None; this.InGcnViewer.RefreshReport(); } else if (mChungChiStatic == 4) { Private_RpInGCN_MatTrong _rpt = new Private_RpInGCN_MatTrong(); ds1 = bidingDataSet_Mattrong_Doi(); _rpt.SetDataSource(ds1); InGcnViewer.ReportSource = _rpt; InGcnViewer.ToolPanelView = ToolPanelViewType.None; InGcnViewer.RefreshReport(); } ////DataSet ds1 = new DataSet(); //if (mChungChiId == 31 || mChungChiId == 32 || mChungChiId == 33 || mChungChiId == 34 || mChungChiId == 14 || mChungChiId == 38 || mChungChiId == 39 || mChungChiId == 42) //{ // Private_RpInGCN_MatTrong _rpt = new Private_RpInGCN_MatTrong(); // ds1 = bidingDataSet_Mattrong_Doi(); // _rpt.SetDataSource(ds1); // InGcnViewer.ReportSource = _rpt; // InGcnViewer.ToolPanelView = ToolPanelViewType.None; // InGcnViewer.RefreshReport(); //} //else //{ // RpInGCN_MatTrong rpt = new RpInGCN_MatTrong(); // //DataSet ds1 = new DataSet(); // ds1 = bidingDataSet_Mattrong_Doi(); // rpt.SetDataSource(ds1); // //rpt.SetParameterValue("SoQT", mSoQT); // InGcnViewer.ReportSource = rpt; // InGcnViewer.ToolPanelView = ToolPanelViewType.None; // this.InGcnViewer.RefreshReport(); //} } #endregion #region Mat ngoai else if (mIndex == 2) { if (mChungChiStatic == 1 || mChungChiStatic == 2 || mChungChiStatic == 3) { RpInGCN_MatNgoai rpt = new RpInGCN_MatNgoai(); //DataSet ds1 = new DataSet(); ds1 = bidingDataSet_Matngoai_Doi(); rpt.SetDataSource(ds1); InGcnViewer.ReportSource = rpt; InGcnViewer.ToolPanelView = ToolPanelViewType.None; this.InGcnViewer.RefreshReport(); } else if (mChungChiStatic == 4) { Private_RpInGCN_MatNgoai _rpt = new Private_RpInGCN_MatNgoai(); ds1 = bidingDataSet_Matngoai_Doi(); _rpt.SetDataSource(ds1); InGcnViewer.ReportSource = _rpt; InGcnViewer.ToolPanelView = ToolPanelViewType.None; this.InGcnViewer.RefreshReport(); } //if (mChungChiId == 31 || mChungChiId == 32 || mChungChiId == 33 || mChungChiId == 34 || mChungChiId == 14 || mChungChiId == 38 || mChungChiId == 39 || mChungChiId == 42) //{ // Private_RpInGCN_MatNgoai _rpt = new Private_RpInGCN_MatNgoai(); // ds1 = bidingDataSet_Matngoai_Doi(); // _rpt.SetDataSource(ds1); // InGcnViewer.ReportSource = _rpt; // InGcnViewer.ToolPanelView = ToolPanelViewType.None; // this.InGcnViewer.RefreshReport(); //} //else //{ // RpInGCN_MatNgoai rpt = new RpInGCN_MatNgoai(); // //DataSet ds1 = new DataSet(); // ds1 = bidingDataSet_Matngoai_Doi(); // rpt.SetDataSource(ds1); // InGcnViewer.ReportSource = rpt; // InGcnViewer.ToolPanelView = ToolPanelViewType.None; // this.InGcnViewer.RefreshReport(); //} } #endregion } }