コード例 #1
0
        public XtraReportTSCD(DevExpress.XtraGrid.GridControl _GridControl)
        {
            InitializeComponent();
            this.Landscape = true;
            DevExpress.XtraGrid.Views.Grid.GridView             _GridView       = new DevExpress.XtraGrid.Views.Grid.GridView();
            DevExpress.XtraGrid.Views.BandedGrid.BandedGridView _BandedGridView = new DevExpress.XtraGrid.Views.BandedGrid.BandedGridView();
            try
            {
                _GridView       = _GridControl.MainView as DevExpress.XtraGrid.Views.Grid.GridView;
                _BandedGridView = _GridControl.MainView as DevExpress.XtraGrid.Views.BandedGrid.BandedGridView;
            }
            catch { }
            int intType = -1;

            if (Object.Equals(_GridView, null))
            {
                _GridView.Dispose();
            }
            else
            {
                intType = 0;
            }
            if (Object.Equals(_BandedGridView, null))
            {
                _BandedGridView.Dispose();
            }
            else
            {
                intType = 1;
            }

            switch (intType)
            {
            case 0:
                ReportDataset      = SHARED.Libraries.ReportHelper.FillDatasetFromGrid(_GridView);
                NumberOfFieldGroup = _GridView.GroupCount;

                SHARED.Libraries.ReportHelper.CreateGroupValues(ReportDataset, _GridView, ref MaxLength, strTag);

                MaxLength         = MaxLength != 0 ? MaxLength > intMinimum ? MaxLength : intMinimum : 0;
                GroupColumnLength = NumberOfFieldGroup * WidthAdd + MaxLength * (int)Math.Ceiling(this.myColumnStyle.Font.Size);

                InitXtraReport(ReportDataset, _GridView);
                break;

            case 1:
                ReportDataset = SHARED.Libraries.ReportHelper.FillDatasetFromGrid(_BandedGridView);

                NumberOfFieldGroup = _BandedGridView.GroupCount;

                SHARED.Libraries.ReportHelper.CreateGroupValues(ReportDataset, _BandedGridView, ref MaxLength, strTag);

                MaxLength         = MaxLength != 0 ? MaxLength > intMinimum ? MaxLength : intMinimum : 0;
                GroupColumnLength = NumberOfFieldGroup * WidthAdd + MaxLength * (int)Math.Ceiling(this.myColumnStyle.Font.Size);

                InitXtraReport(ReportDataset, _BandedGridView);
                break;
            }
        }
コード例 #2
0
 public void Dispose(bool dispose)
 {
     if (dispose)
     {
         _dgvScontrino.Dispose();
         _gcScontrino.Dispose();
     }
 }
コード例 #3
0
        public XtraReportTSCD(DevExpress.XtraGrid.GridControl _GridControl)
        {
            InitializeComponent();
            this.Landscape = true;
            DevExpress.XtraGrid.Views.Grid.GridView _GridView = new DevExpress.XtraGrid.Views.Grid.GridView();
            DevExpress.XtraGrid.Views.BandedGrid.BandedGridView _BandedGridView = new DevExpress.XtraGrid.Views.BandedGrid.BandedGridView();
            try
            {
                _GridView = _GridControl.MainView as DevExpress.XtraGrid.Views.Grid.GridView;
                _BandedGridView = _GridControl.MainView as DevExpress.XtraGrid.Views.BandedGrid.BandedGridView;
            }
            catch { }
            int intType = -1;
            if (Object.Equals(_GridView, null))
            {
                _GridView.Dispose();
            }
            else
                intType = 0;
            if (Object.Equals(_BandedGridView, null))
            {
                _BandedGridView.Dispose();
            }
            else
                intType = 1;

            switch (intType)
            {
                case 0:
                    ReportDataset = SHARED.Libraries.ReportHelper.FillDatasetFromGrid(_GridView);
                    NumberOfFieldGroup = _GridView.GroupCount;

                    SHARED.Libraries.ReportHelper.CreateGroupValues(ReportDataset, _GridView, ref MaxLength, strTag);

                    MaxLength = MaxLength != 0 ? MaxLength > intMinimum ? MaxLength : intMinimum : 0;
                    GroupColumnLength = NumberOfFieldGroup * WidthAdd + MaxLength * (int)Math.Ceiling(this.myColumnStyle.Font.Size);

                    InitXtraReport(ReportDataset, _GridView);
                    break;
                case 1:
                    ReportDataset = SHARED.Libraries.ReportHelper.FillDatasetFromGrid(_BandedGridView);

                    NumberOfFieldGroup = _BandedGridView.GroupCount;

                    SHARED.Libraries.ReportHelper.CreateGroupValues(ReportDataset, _BandedGridView, ref MaxLength, strTag);

                    MaxLength = MaxLength != 0 ? MaxLength > intMinimum ? MaxLength : intMinimum : 0;
                    GroupColumnLength = NumberOfFieldGroup * WidthAdd + MaxLength * (int)Math.Ceiling(this.myColumnStyle.Font.Size);

                    InitXtraReport(ReportDataset, _BandedGridView);
                    break;
            }
        }
コード例 #4
0
        public XtraReport_Template(DevExpress.XtraGrid.GridControl _GridControl, Boolean Landscape)
        {
            InitializeComponent();
            this.Landscape = Landscape;
            DevExpress.XtraGrid.Views.Grid.GridView             _GridView       = new DevExpress.XtraGrid.Views.Grid.GridView();
            DevExpress.XtraGrid.Views.BandedGrid.BandedGridView _BandedGridView = new DevExpress.XtraGrid.Views.BandedGrid.BandedGridView();
            try
            {
                _GridView       = _GridControl.MainView as DevExpress.XtraGrid.Views.Grid.GridView;
                _BandedGridView = _GridControl.MainView as DevExpress.XtraGrid.Views.BandedGrid.BandedGridView;
            }
            catch { }
            int intType = -1;

            if (Object.Equals(_GridView, null))
            {
                _GridView.Dispose();
            }
            else
            {
                intType = 0;
            }
            if (Object.Equals(_BandedGridView, null))
            {
                _BandedGridView.Dispose();
            }
            else
            {
                intType = 1;
            }

            switch (intType)
            {
            case 0:
                ReportDataset = SHARED.Libraries.ReportHelper.FillDatasetFromGrid(_GridView);
                break;

            case 1:
                ReportDataset = SHARED.Libraries.ReportHelper.FillDatasetFromGrid(_BandedGridView);
                break;
            }
        }
コード例 #5
0
        public XtraReport_Template(DevExpress.XtraGrid.GridControl _GridControl, Boolean Landscape)
        {
            InitializeComponent();
            this.Landscape = Landscape;
            DevExpress.XtraGrid.Views.Grid.GridView _GridView = new DevExpress.XtraGrid.Views.Grid.GridView();
            DevExpress.XtraGrid.Views.BandedGrid.BandedGridView _BandedGridView = new DevExpress.XtraGrid.Views.BandedGrid.BandedGridView();
            try
            {
                _GridView = _GridControl.MainView as DevExpress.XtraGrid.Views.Grid.GridView;
                _BandedGridView = _GridControl.MainView as DevExpress.XtraGrid.Views.BandedGrid.BandedGridView;
            }
            catch { }
            int intType = -1;
            if (Object.Equals(_GridView, null))
            {
                _GridView.Dispose();
            }
            else
                intType = 0;
            if (Object.Equals(_BandedGridView, null))
            {
                _BandedGridView.Dispose();
            }
            else
                intType = 1;

            switch (intType)
            {
                case 0:
                    ReportDataset = SHARED.Libraries.ReportHelper.FillDatasetFromGrid(_GridView);
                    break;
                case 1:
                    ReportDataset = SHARED.Libraries.ReportHelper.FillDatasetFromGrid(_BandedGridView);
                    break;
            }
        }