Current filter:
                                You should refresh the page.
                                Support Center
                                  • I am using XAF and XPO, 12.2.8 and am wondering if functionality exists to do the following:

                                    Feed a stored procedure into a nonpersistent XPO object then feed that nonpersistent object into the XAF report designer. I know functionality exists for the first as evidenced in the support ticket:

                                    However the only thing I could find regarding feeding a NPO into the report designer was from 2 years ago saying that functionality is "coming."

                                    Is there a way to do this? I tried duplicating the functionality of the stored procedure in the report designers filter, but the report was so slow and so memory intensive that this is simply not feasible. Thanks in advance.

                                1 Solution

                                Creation Date Rating Importance Sort by

                                Hello Chris,

                                Currently we do not provide an out-of-the-box way to display either non-persistent objects or the result returned by a stored procedure in an XAF report. You can easily implement this by creating a native XtraReport in Visual Studio and then displaying it when an action is clicked via the PrintTool.ShowPreview method. Such a report can be bound to any datasource, including a collection of non-persistent objects.

                                XAF reports, in their turn, can be bound only to a particular persistent type. They load objects to their datasource internally based on the data type and filter. However, there is a way to suppress this behavior and pass a custom collection to the report's datasource. Please refer to similar tickets to learn how to do this:

                                Report Wizard for NonPersistent Objects
                                Reports - Provide the capability to create a custom XPCollection object in the XafReport class

                                Note that since this solution overrides the default XAF functionality, we cannot guarantee that Reports Module will properly work with such a report in all scenarios.

                                • Chris Chicherchia 08.06.2013

                                  Actually, I have a different solution in mind... I'm creating a dummy persistent object which will have, as a property, a collection of non persistent objects containing the results. The report designer can definitely access that. I think you should allow the XAF report designer to access non persistent objects. I don't see how it would be any different. I don't think we as developers should have to make workarounds to develop functionality that should already be implemented. Also, I wouldn't need to do this at all if it weren't for the fact that these report designers try to load the whole thing into memory rather than build the appropriate SQL.

                                • Thank you for your feedback. We are already working in this direction and, if everything goes well, we will provide a new way to specify a report's datasource in the upcoming release (13.2).
                                  As for the problem with loading the entire data set, it is possible to improve performance in the current version. First, you can define a server-side filter via the XafReport.Filtering.Filter property. Second, you can make large and rarely used properties of your persistent object delayed. In this case, they will not be loaded from the database if they are not used in the report.

                                If you need additional product information, write to us at 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, ASP.NET, WinForms, HTML5 or Windows 10, DevExpress tools help you build and deliver your best in the shortest time possible.

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