Exemplo n.º 1
0
        void CreateReportHeader(ReportWizardContext context)
        {
            var pageOneContext = (PageOneContext)context.PageOneContext;

            var centerLocation = DesignerHelper.AlignCenter(ReportModel.ReportSettings.PrintableWidth(), GlobalValues.PreferedSize.Width);
            var headerText     = new BaseTextItem()
            {
                Text     = String.IsNullOrEmpty(pageOneContext.ReportName) ? GlobalValues.DefaultReportName : pageOneContext.ReportName,
                Location = new Point(centerLocation, 10)
            };

            ReportModel.ReportHeader.Items.Add(headerText);

            var xLoc     = DesignerHelper.AlignRight(ReportModel.ReportSettings.PrintableWidth(), GlobalValues.PreferedSize.Width) - 5;
            var dateText = new BaseTextItem()
            {
                Text     = "= Today.Today",
                Location = new Point(xLoc, 10)
            };

            ReportModel.ReportHeader.Items.Add(dateText);
        }