Current filter:
                                You should refresh the page.
                                Support Center
                                0
                                  • Personal ref : 0000542: Pouvoir modifier un état d'entête     

                                    Hello,

                                    I created a subreport that contains the header of the documents so I can reuse it every documents in my application.
                                    One of my Customer needs to have 2 different header and be able to choose wich one he will print.

                                    I would like to know how I can dynamically load a subreport in a script of my main report.

                                    Many thanks in advance,

                                    Julien

                                • Thomas Vetterling 07.07.2013

                                  For selecting the 'kind' of subreport you could use XtraReport-Parameter (that is problematic with ASPx) or a ReportParametersObject descandent (here you would have to show a detailview of the ReportParametersObject before printing).
                                  Finally you have to handle the reports Before_Print Event to change the 'SourceUrl' of the subreport acording your parameter.

                                • Yes, I agree that approach suggested by Thomas Vetterling is appropriate to accomplish this task. Please contact us if you experience any further difficulties.

                                You must  log in  or  register  to leave comments

                                1 Solution

                                0

                                The answer from Thomas works like a charm.
                                But be carefull to use the BeforePrint event of the report and not the one of the band where the subreport is in.

                                • I am glad to hear that the issue has been resolved. Please contact us if you experience any further difficulties.

                                You must  log in  or  register  to leave comments

                                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