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

                                    I've implemented a custom ReportStorageExtension class and a custom ReportTypeService class to be able to create and store reports in a database.

                                    However, since all reports derive from a common base class, it's impossible to create sub-reports (due to the restriction mentioned in the subject).

                                    How can I overcome this?

                                    Thanks,
                                    Stefan

                                    P.S A sample application can be found in issue B195170 (marked Private).

                                0

                                Hello Stefan,

                                I believe that you can use the CodeDOM methods to generate a report types for subreports at runtime. For instance, review the EUD nameing of nested subreports thread where a similar question has been answered.

                                Thanks,
                                Alessandro.

                                0

                                Hi Alessandro,

                                Thank you for your very quick reply.

                                I looked at the thread you mentioned and I do not think this is the solution.

                                It is possible in the EUD to create two reports where both derive from XtraReport and have one be a sub report within the other.

                                Creating two reports which derive from a base class (which derives from XtraReport) however, is not possible.

                                A solution I've found from browsing in your code is this: Adding the RootClassAttribute to my base class.

                                Which consequenced could this have for my application besides enabling subreports?

                                Thanks,
                                Stefan

                                0

                                Hi Stefan,

                                Thank you for your feedback.
                                With the 2010.2 version of the XtraReport suite. I believe that you can utilize the XRSubreport.ReportSourceUrl property to solve this problem.
                                See Also:
                                PROBLEM WITH THE REPORTSOURCE PROPERTY OF THE SUBREPORT CONTROL

                                Thanks,
                                Andrew

                                0

                                Hi Andrew

                                Thanks for your reply.

                                I am using the approach you mention, and my question was not answered.

                                As previously stated I've found a way to use the same base class for both master and sub report. By decorating the base class with the rootclass attribute the internal validation passes.

                                My question was which consequences this might have besides passing validation?

                                Thanks,
                                Stefan

                                0

                                Hi Stefan,

                                The XRSubreport.ReportSource property validation was implemented to avoid circular reference issues.
                                Please feel free to contact us if you need any additional assistance. We will be happy to help you.

                                Thanks,
                                Andrew

                                0

                                Yes, and by decorating my class with the attribute mentioned I can pass this validation.

                                However, like I've now asked thrice in this thread: what other consequences may this have elsewhere in the devexpress suite?

                                Thanks,
                                Stefan

                                0

                                Hi Stefan,

                                It looks like there are no other related issues. If you notice any related problem, please feel free to update this ticket. We will check for a solution.

                                Thanks,
                                Alex

                                0

                                Hi Alex,

                                Thank you for your reply. It answered my question.

                                I hope you do not plan to remove this check within the validation function in the future.

                                As a side note, why is this check here? There must have been a reason for checking for that particular attribute, and as far as I can see, this attribute is not applied to the XtraReport base class.

                                Thanks,
                                Stefan

                                0

                                Hello Stefan,

                                Basically, the RootClassAttribute is used only in the XtraReport class to designate that this class instance can be used as a subreport in the instance of the same class. However, we do not recommend using this attribute for the user-defined classes. Otherwise, you might encounter a cyclic references error and a StackOverflowException. Please feel free to contact us if you need any additional assistance. We will be happy to help you.

                                Thanks,
                                Alessandro.

                                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, 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