Exemplo n.º 1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            RpInGCN_MatTrong_English rpt = new RpInGCN_MatTrong_English();

            rpt.Site = this.Site;
            return(rpt);
        }
Exemplo n.º 2
0
        private void printReport()
        {
            DataSet ds1 = new DataSet();

            /*mCheckDoi ==1: Cap moi*/
            if (mCheckDoi == 1)
            {
                #region Mat trong
                if (mIndex == 1)
                {
                    switch (mChungChiStatic)
                    {
                    case 1:
                    case 2:
                    case 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();
                        break;
                    }

                    case 4:
                    {
                        Private_RpInGCN_MatTrong _rpt = new Private_RpInGCN_MatTrong();
                        ds1 = bidingDataSet_Mattrong();
                        _rpt.SetDataSource(ds1);
                        InGcnViewer.ReportSource  = _rpt;
                        InGcnViewer.ToolPanelView = ToolPanelViewType.None;
                        InGcnViewer.RefreshReport();
                        break;
                    }

                    case 5:
                    {
                        Private_matTrong_Mau2 _rpt = new Private_matTrong_Mau2();
                        ds1 = bidingDataSet_Mattrong();
                        _rpt.SetDataSource(ds1);
                        InGcnViewer.ReportSource  = _rpt;
                        InGcnViewer.ToolPanelView = ToolPanelViewType.None;
                        InGcnViewer.RefreshReport();
                        break;
                    }

                    case 6:
                    {
                        RpInGCN_MatTrong_English rpt = new RpInGCN_MatTrong_English();
                        ds1 = bidingDataSet_Mattrong_English();
                        rpt.SetDataSource(ds1);
                        InGcnViewer.ReportSource  = rpt;
                        InGcnViewer.ToolPanelView = ToolPanelViewType.None;
                        this.InGcnViewer.RefreshReport();
                        break;
                    }

                    default:
                        break;
                    }
                }

                #endregion
                #region Mat ngoai
                else if (mIndex == 2)
                {
                    /*2017-07-25 - TrieuVH update start*/
                    switch (mChungChiStatic)
                    {
                    case 1:
                    case 2:
                    case 3:
                        RpInGCN_MatNgoai_DacBiet rpt3 = new RpInGCN_MatNgoai_DacBiet();
                        ds1 = bidingDataSet_Matngoai();
                        rpt3.SetDataSource(ds1);
                        InGcnViewer.ReportSource  = rpt3;
                        InGcnViewer.ToolPanelView = ToolPanelViewType.None;
                        this.InGcnViewer.RefreshReport();
                        break;

                    case 4:
                    case 6:
                        Private_RpInGCN_MatNgoai _rpt = new Private_RpInGCN_MatNgoai();
                        ds1 = bidingDataSet_Matngoai();
                        _rpt.SetDataSource(ds1);
                        InGcnViewer.ReportSource  = _rpt;
                        InGcnViewer.ToolPanelView = ToolPanelViewType.None;
                        this.InGcnViewer.RefreshReport();
                        break;
                    }
                }
                #endregion
            }
            else
            {
                #region Mat trong
                // In mat trong cua report
                if (mIndex == 1)
                {
                    switch (mChungChiStatic)
                    {
                    case 1:
                    case 2:
                    case 3:
                    {
                        RpInGCN_MatTrong_DacBiet rpt = new RpInGCN_MatTrong_DacBiet();
                        ds1 = bidingDataSet_Mattrong_Doi();
                        rpt.SetDataSource(ds1);
                        InGcnViewer.ReportSource  = rpt;
                        InGcnViewer.ToolPanelView = ToolPanelViewType.None;
                        this.InGcnViewer.RefreshReport();
                        break;
                    }

                    case 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();
                        break;
                    }

                    case 5:
                    {
                        Private_matTrong_Mau2 _rpt = new Private_matTrong_Mau2();
                        ds1 = bidingDataSet_Mattrong_Doi();
                        _rpt.SetDataSource(ds1);
                        InGcnViewer.ReportSource  = _rpt;
                        InGcnViewer.ToolPanelView = ToolPanelViewType.None;
                        InGcnViewer.RefreshReport();
                        break;
                    }

                    case 6:
                    {
                        RpInGCN_MatTrong_English rpt = new RpInGCN_MatTrong_English();
                        ds1 = bidingDataSet_Mattrong_English();
                        rpt.SetDataSource(ds1);
                        InGcnViewer.ReportSource  = rpt;
                        InGcnViewer.ToolPanelView = ToolPanelViewType.None;
                        this.InGcnViewer.RefreshReport();
                        break;
                    }

                    default:
                        break;
                    }
                }
                #endregion
                #region Mat ngoai

                else if (mIndex == 2)
                {
                    switch (mChungChiStatic)
                    {
                    case 1:
                    case 2:
                    case 3:
                        RpInGCN_MatNgoai_DacBiet rpt3 = new RpInGCN_MatNgoai_DacBiet();
                        ds1 = bidingDataSet_Matngoai_Doi();
                        rpt3.SetDataSource(ds1);
                        InGcnViewer.ReportSource  = rpt3;
                        InGcnViewer.ToolPanelView = ToolPanelViewType.None;
                        this.InGcnViewer.RefreshReport();
                        break;

                    case 4:
                    case 6:
                        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();
                        break;
                    }
                }
                #endregion
            }
        }