Ticket T392780
Visible to All Users

Report with two tables

created 9 years ago

Hi

I am trying to create a table form two tables , I face to problem : the data cannot display & the header of column repeat many times

this is an example in the attachments

Answers approved by DevExpress Support

created 9 years ago

Hello Hamza,
I see that you have correctly added DetailReportBands to your main report in order to display data from different data tables as illustrated at How to: Bind a Report to Multiple Data Tables. However, you pass a data source to your main report instance like XtraReport.DataSource while you need to assign the data source to the corresponding DetailReportBand instances. So, please modify your code accordingly. You can either obtain the required DetailReportBand instance by using the XtraReport.FindControl method or even create a public method in the XtraReport class and pass the data source there. Please refer to the following code snippet.

Visual Basic
'... Dim detail1 As DetailReportBand = TryCast(Rep.FindControl("DetailReport", True), DetailReportBand) detail1.DataSource = Ds Dim detail2 As DetailReportBand = TryCast(Rep.FindControl("DetailReport1", True), DetailReportBand) detail2.DataSource = Ds '...

Let me know if this solution works for you.

    Comments (2)

      Hi Jannet

      thanks for  your help

      I followed  the link  and the report works well

      but  I need to add some   title for data    like  the blue text in the attached pdf

      Thnaks

      DevExpress Support Team 9 years ago

        Hello Hamza,
        I'm happy to hear that this solution was helpful. In order not to mix several issues in one thread, I've created a separate ticket on your behalf (T393011: How to add a title for data). It has been placed in our processing queue and will be answered shortly.

        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.