Current filter:
                                You should refresh the page.
                                Support Center
                                0
                                  • Dear DevExpress-Support,

                                    how can i set the header and Footer in the Xtraprinting-library (in kombination with xtrapivotgrid) per c#-code?

                                    Thanks

                                0

                                Hello Michael,

                                Our documentation contains a help topic that shows how to do this. To find it, open the Feature Center > Data Exchange > Print Data topic and then click the "How to: Add a Report Header when Printing and Exporting a Control " link at its bottom.

                                Thank you, Alex.

                                0

                                Hello Alex,

                                thank you for the hint, it works very fine!

                                2 further questions:
                                - how to get these header or footer on every page ?
                                - how to get flelds like "Page 1 of 5" or "Printdate 12.11.2007" ?

                                thanks

                                Michael

                                0

                                Hello,

                                To specify the page header and footer, use the PrintableComponentLink's PageHeaderFooter property. You can customize this property at design time invoking the designer in the Property Grid.

                                Thank you, Alex.

                                0

                                Sorry Alex,

                                i have to ask again: how to set these header's per code.
                                please look at the attachment.

                                thanks

                                michael

                                HeaderAndFooter.JPG
                                0

                                Hello Michael,

                                Here is the code that adds a page header and footer to the report:

                                this.printableComponentLink1.PageHeaderFooter = new DevExpress.XtraPrinting.PageHeaderFooter(new DevExpress.XtraPrinting.PageHeaderArea(new string[] {
                                    "", "Header",""}, new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))), DevExpress.XtraPrinting.BrickAlignment.Near), new DevExpress.XtraPrinting.PageFooterArea(new string[] {
                                    "", "[Page # of Pages #]", ""}, new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))), DevExpress.XtraPrinting.BrickAlignment.Near));

                                printableComponentLink1.ShowPreview();

                                Thank you, Alex.

                                0

                                Hello Alex,

                                thank you very much. this is exact what i'm looking for !

                                greetings, Michael

                                To start a chat you should create a support ticket


                                If you need additional product information, write to us at info@devexpress.com or call us at +1 (818) 844-3383

                                FOLLOW US

                                DevExpress engineers feature-complete Presentation Controls, IDE Productivity Tools, Business Application Frameworks, and Reporting Systems for Visual Studio, along with high-performance HTML JS Mobile Frameworks for developers targeting iOS, Android and Windows Phone. Whether using WPF, Silverlight, ASP.NET, WinForms, HTML5 or Windows 8, DevExpress tools help you build and deliver your best in the shortest time possible.

                                Copyright © 1998-2014 Developer Express Inc.
                                All trademarks or registered trademarks are property of their respective owners