Ticket S18025
Visible to All Users
Duplicate

We have closed this ticket because another page addresses its subject:

Weak associations as member collections

Reports - Collection properties not marked with the Association attribute should be visible in the report designer (ObjectModelBrowser tree)

created 18 years ago

See attachment.
     public class Sale : XPObject {
          private XPCollection<Product> products;
          public Sale(Session session) : base(session) { }
          // This list is invisible
          public XPCollection<Product> Products {
               get {
                    if(products == null) {
                         products = new XPCollection<Product>(Session);
                    }
                    return products;
               }
          }
          // This list is visible in the popup menu.
          [Association("A-A")]
          public XPCollection<Attachment> Attachments {
               get { return GetCollection<Attachment>("Attachments"); }
          }
Only the Attachments collection is in the submenu, but the Products is not accessible.

Comments (3)
DevExpress Support Team 18 years ago

    Aleks,
    Can you suggest a solution for accomplishing this task? We cannot figure out how to implement this feature so far.
    Thank you,
    Nick

    Aleksei M. (DevExpress) 18 years ago

      For instance I have a class A, which has a collection of objects of class B. But I do not have sources for the class B, so I do not have the possibility to add the association attribute for the collection. As a result such collection is not visible in reports.

      DevExpress Support Team 14 years ago

        Up to now, if a collection property did not have the Association attribute applied, the collection was not available in the report designer. This was a real drawback as it effectively prohibited the use of non-persistent object collections in reports. It was also an issue for persistent object collections, since adding unnecessary associations could impact performance of an application. So, in v2010 vol2, we have resolved the issue, and now all collection properties are available in the report designer.
        The attached screenshot is taken from the MainDemo application, which is shipped with XAF. The ChangeHistory Detail Report represents a collection of object changes tracked by the Audit Trail module. This collection is not decorated with the Association attribute and, prior to v2010 vol2, it will be simply unavailable in the report designer.
        See Also:
        XAF - Improvements to The Printing and Reporting Modules (coming in V2010 V2)

        Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

        Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.