Current filter:
                                You should refresh the page.
                                Support Center
                                0
                                  • I am attempting to embed a subreport within a master report following the steps outlined in the documentation: How to: Create a Master-Detail Report using Subreports
                                    The report runs without displaying the data for the subreport.

                                    Here is the pertinent information:

                                    Sub report's BeforPrint Event handler:

                                            private void xrSubreport2_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
                                            {
                                                ((DetailedConclusionSubReport)((XRSubreport)sender).ReportSource).ParamOversightID.Value =
                                                        Convert.ToInt32(GetCurrentColumnValue("OversightID"));
                                            }

                                    Filter String of the sub report's Report: [OversightID] = ?ParamOversightID

                                    Declaration of the parameter:

                                    Visible = false
                                    Type = Int32
                                    Name = ParamOversightID
                                    Modifiers = Public

                                    I temporarily turned the parameter on: Visible = true and ran the sub rejport standalone in the preview mode. I manually entered parameter values and the sub report ran okay. Also i am able to run the master report okay (the sub report simply does not display).

                                    THE PAGE HEADER OF THE SUBREPORT DOES DISPLAY. So i know the subreport is connecting.

                                    My suspicion is that the event handler is wrong.

                                    Willie

                                0

                                Hi Willie,

                                Thank you for contacting us. Your approach seems correct. It looks like the issue is related to your particular report layout implementation. To clarify the situation, please post your sample project here.
                                I will examine it, and then check for a solution.

                                Thanks,
                                Alex

                                0

                                Attached is a sample project.

                                0

                                Willie,

                                I cannot extract the WindowsFormsApplication1.zipx archive on my machine. Please repack your example using the built-in Windows -> Send to compressed folder feature, and post it here. Then, I will continue the research.

                                Thanks,
                                Alex

                                0

                                i have rezipped the sample application. Sorry for the inconvenience.

                                0

                                Willie,

                                No problem at all. It looks like you are trying to render the main report using the Preview option in Visual Studio. Please note that all code-behind event handlers are not effective in this situation. You might need to handle the Form.Load event and create an XtraReportMain instance. This way, you should be able to display the main report using its ShowPreview method.If you need to see changes both at design time and at runtime, please use the XtraReports' scripting technology, and move all event handlers to scripts.
                                To learn more, check the Scripting Overview documentation article.

                                Thanks,
                                Alex

                                0

                                I have run the report inside of my main program. I get the same result as when i am in the designer. I also tested by having my labels in the sub rejport show (setting the report property to show up on empty data). For each master record i see the sub report's labels but no data is loaded.

                                As a side note: I have also tested by trying the detail band method and also i get no data.

                                0

                                Willie,

                                This is rather strange. I do not have VistaDB installed on my machine. However, I have managed to replace the report's datasource using the common Northwind database.
                                Attached is a sample project that works fine here. Please review it and let me know whether or not this helps.

                                Thanks,
                                Alex

                                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