예제 #1
0
        private void miAddDetailDataBand_Click(object sender, EventArgs e)
        {
            DataBand band       = FSelection[0] as DataBand;
            DataBand detailData = new DataBand();

            detailData.Parent = band;
            detailData.CreateUniqueName();
            detailData.Height = detailData.GetPreferredSize().Height;

            Change();
        }
예제 #2
0
        /// <inheritdoc/>
        public override void SetDefaults()
        {
            switch (Config.ReportSettings.DefaultPaperSize)
            {
            case DefaultPaperSize.A4:
                PaperWidth  = 210;
                PaperHeight = 297;
                break;

            case DefaultPaperSize.Letter:
                PaperWidth  = 215.9f;
                PaperHeight = 279.4f;
                break;
            }

            float baseHeight = Units.Millimeters * 10;

            if (ReportWorkspace.Grid.GridUnits == PageUnits.Inches ||
                ReportWorkspace.Grid.GridUnits == PageUnits.HundrethsOfInch)
            {
                baseHeight = Units.Inches * 0.4f;
            }

            ReportTitle = new ReportTitleBand();
            ReportTitle.CreateUniqueName();
            ReportTitle.Height = baseHeight;

            PageHeader = new PageHeaderBand();
            PageHeader.CreateUniqueName();
            PageHeader.Height = baseHeight * 0.75f;

            DataBand data = new DataBand();

            Bands.Add(data);
            data.CreateUniqueName();
            data.Height = baseHeight * 2;

            PageFooter = new PageFooterBand();
            PageFooter.CreateUniqueName();
            PageFooter.Height = baseHeight * 0.5f;
        }