コード例 #1
0
 private void CreateResultTable()
 {
     SetResultTable(new TableResult());
     // assign properties from this object. Do not use Assign method: TableResult is incompatible with MatrixObject.
     ResultTable.OriginalComponent = OriginalComponent;
     ResultTable.Alias             = Alias;
     ResultTable.Border            = Border.Clone();
     ResultTable.Fill                    = Fill.Clone();
     ResultTable.Bounds                  = Bounds;
     ResultTable.RepeatHeaders           = RepeatHeaders;
     ResultTable.RepeatRowHeaders        = RepeatRowHeaders;
     ResultTable.RepeatColumnHeaders     = RepeatColumnHeaders;
     ResultTable.Layout                  = Layout;
     ResultTable.WrappedGap              = WrappedGap;
     ResultTable.AdjustSpannedCellsWidth = AdjustSpannedCellsWidth;
     ResultTable.SetReport(Report);
     ResultTable.AfterData += new EventHandler(ResultTable_AfterData);
 }
コード例 #2
0
ファイル: TableObject.cs プロジェクト: zwyl2001/FastReport
        /// <inheritdoc/>
        public override void SaveState()
        {
            saveVisible = Visible;
            BandBase parent = Parent as BandBase;

            saveStateSkipped = !Visible || (parent != null && !parent.Visible);
            if (saveStateSkipped)
            {
                return;
            }

            if (!IsManualBuild)
            {
                base.SaveState();
            }
            else
            {
                // create the result table that will be rendered in the preview
                SetResultTable(new TableResult());
                ResultTable.Assign(this);
                ResultTable.SetReport(Report);
                helper = new TableHelper(this, ResultTable);

                Visible = false;

                if (parent != null)
                {
                    parent.Height      = Top;
                    parent.CanGrow     = false;
                    parent.CanShrink   = false;
                    parent.AfterPrint += new EventHandler(ResultTable.GeneratePages);
                }

                OnManualBuild(EventArgs.Empty);
            }
        }