Ticket CQ66692
Visible to All Users

How to bind subreport

created 18 years ago

Hi,
I have a report make with framework and I can add only field of my class bind with this report. I need to put information from singleton in this report. Can I make subreport bind with my singleton and use it in report?
Thanks.

Comments (3)
DevExpress Support Team 18 years ago

    Hi Patrick;

    1. You can't create one report from two BOs directly. You can create an additional BO and set a one-to-many relationship between this BO and a XPCollection of BOs that are necessary to be reported together. Than you can create a report for this additional BO.
    2. If you have a singleton associated with an XPCollection and want to allow the user to report this singleton and the corresponding XPCollection, you should set the VisibleInReport Attribute for this singleton to true.
      I've attached the project that shows you the second way.
      Thanks,
      Marina.
    PP PP
    Patrick Pettigrew 18 years ago

      My singleton class have no relation with other class. This singleton class is for company name, adress, phone number, etc…
      I want add name of company and adress on invoice report, If adress of company change, the adress on report will be change also.
      Thanks.

      DevExpress Support Team 18 years ago

        Hi Patrick;
        In your case, you should follow the second way that I mentioned.
        You should create a new BO that you will use only in Reports (the VisibleInReports attribute is set to True). You should set a one-to-many relationship between this BO and a XPCollection of BOs that are necessary to be reported together. Also, this BO must be a singleton. You should create this BO instance in the UpdateDatabaseAfterUpdateSchema() method.
         I've attached a project.
        Thanks,
        Marina.

        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.