Current filter:
                                You should refresh the page.
                                Support Center
                                0
                                  • Hello

                                    I would like to print two reports on one A4 page. I have placed two subreport controls on a new report each containing the same report.
                                    Both reports have detail bands, which can grow according to data. I want that the location of the second report is fixed, this means that it's unaffected by the growth of the first report. See attachment.

                                Report.PNG
                                0

                                Hello Marko,

                                Thank you for the screenshot. It really helped me understand your scenario. I belive that you can achieve the desired result by placing the second subreport into a GroupFooterBand and setting its GroupFooterBand.PrintAtBottom Property to true. Attached is a sample, demonstrating how this works. Though it's a WinForms app, this technique will work the same way on the ASP.NET web site. I've created this app only for testing purposes: you can quickly change the number of rows in the first subreport by updating the numeric value in the TextBox. Please let me know whether this helps you.

                                Thanks,
                                Alessandro.

                                RepTwoSubreportsFixedPos.zip
                                0

                                Thank you for your sample. The A4 Report is printed on a paper which is cut in two pieces with same height. The alignment of the second SubReport must be fixed at the half of the paper. If I set the PrintAtButtom Property to true is stays aligned to the buttom. Any further suggestions?

                                0

                                Maybe this attachment will help in understanding the problem.

                                pic.PNG
                                0

                                Hello Marko,

                                If so, our solution is still effective (of course, unless I'm mistaken). You should simply increase the DetailBand.Height and GroupFooterBand.Height property values so that these bands occupy 1/2 of the page. Also, it is important to increase the XRSubreport.Height for both subreports accordingly. Attached is an updated sample. Please let us know whether this makes sense.

                                Thanks,
                                Alessandro.

                                RepTwoSubreportsFixedPos2.zip
                                0

                                Your solution does not work if both subreports expand dynamically (according to data). Maybe the solution described in this post http://www.devexpress.com/Support/Center/p/Q104708.aspx would help. But I need to know how to calculate the required space manually, based on the number of rows to be printed in the subreport and their length.

                                0

                                Hello Marko,

                                I believe that you can calculate the height of the report using the approach from the Automatic adjust the report page height thread. Hope this information helps you.

                                Thanks,
                                Alessandro.

                                0

                                Thank your for your suggestion. I have one further question. Is there any way I can get number of lines or the actual height of the subreport or bands? If I use the HeightF property I get always the same height no matter how the the band expands.
                                I need that information to dynamically insert blank lines or resize the report.

                                0

                                Hello Marko,

                                This approach is demonstrated in the sample project attached to the Automatic adjust the report page height thread:

                                	
                                [VB.NET]
                                report.PageHeight = report.PageHeight + report.Bands(DevExpress.XtraReports.UI.BandKind.Detail).HeightF * (items.Count - 1)

                                So, the height of the DetailBand is multiplied by the number of records in the datasource a report is bound to. Please try this solution. If this information does not help you, or your scenario is slightly different, please provide us with a problematic sample and step-by-step instructions on how to reproduce the problem. Then, we will continue our investigation.

                                Thanks,
                                Alessandro.

                                0

                                I found a similar way. I added an xrLabel control at the bottom of the report. Then created two instances of the same report and on the first instance(first subreport) I filled the label control with newlines as needed.

                                Thank your for your help.

                                0

                                Hello Marko,

                                I am glad to hear that the problem has been resolved. Thank you for letting us know about your progress. Please feel free to contact us in case of any further difficulty. We will be happy to assist you.

                                Thanks,
                                Alessandro.

                                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