コード例 #1
0
        private Infragistics.Documents.Reports.Report.Section.ISection formatPage(Infragistics.Documents.Reports.Report.Section.ISection s1)
        {
            //sets properties on the section
            //to add page numbers
            s1.PageNumbering.SkipFirst = true;
            s1.PageNumbering.OffsetY = -18;
            s1.PageNumbering.Template = "Page [Page #] of [TotalPages]";

            //adds a header to the PDF
            Infragistics.Documents.Reports.Report.Section.ISectionHeader s1header = s1.AddHeader();
            s1header.Height = 20;
            s1header.Repeat = false;

            //adds text to the header area
            Infragistics.Documents.Reports.Report.Text.IText s1headertitle = s1header.AddText(0, 0);
            s1headertitle.AddContent("Logic University :" + drdReportList.SelectedItem.ToString());
            s1headertitle.Alignment = TextAlignment.Left;

            Infragistics.Documents.Reports.Report.Text.IText s1headertimestamp = s1header.AddText(0, 0);
            s1headertimestamp.AddContent("Generated on: ");
            s1headertimestamp.AddDateTime("MM/dd/yyyy hh:mm:ss");
            s1headertimestamp.Alignment = TextAlignment.Right;

            return s1;
        }