none
Table relationships in Visual Studio Report Designer RRS feed

  • Question

  • I'm trying to write a report that has a list of outstanding invoices for several customers.  For example - we want to display a customer name, followed by all that customer's invoices, then the second customer name and all their invoices, and so on for each customer.

    I can't figure out how to relate the tables to each other in order for this to work.  What am I missing?

    Thursday, July 1, 2010 2:22 AM

Answers

  • Let's assume there is some kind of unique ID for each customer called CustID.

    The first possible solution is a parent child relationship where the parent table is all the customers with their CustIDs. The child table is all the invoices for all customers. The parent records are the main grouping, with a sub report that filters for only the invoices for the parent CustID.

    The second possible solution that I've found to be faster in rendering is to have one table with each record being an invoice and include the customer information with each invoice record. Then on your report, you group by the CustID field and display the Customer demographic information as first record data. While this is wasteful in dataset space, I've found it to render faster for the user who is awaiting their report.

    Pick either of these directions and we can then give you more guidance on how to set up the actual report.

    Bernie

     

    • Marked as answer by BJ Quinn Friday, July 2, 2010 9:35 PM
    Thursday, July 1, 2010 3:41 AM

All replies

  • Let's assume there is some kind of unique ID for each customer called CustID.

    The first possible solution is a parent child relationship where the parent table is all the customers with their CustIDs. The child table is all the invoices for all customers. The parent records are the main grouping, with a sub report that filters for only the invoices for the parent CustID.

    The second possible solution that I've found to be faster in rendering is to have one table with each record being an invoice and include the customer information with each invoice record. Then on your report, you group by the CustID field and display the Customer demographic information as first record data. While this is wasteful in dataset space, I've found it to render faster for the user who is awaiting their report.

    Pick either of these directions and we can then give you more guidance on how to set up the actual report.

    Bernie

     

    • Marked as answer by BJ Quinn Friday, July 2, 2010 9:35 PM
    Thursday, July 1, 2010 3:41 AM
  • I ended up doing the second suggestion, and it works.

    Thanks!!

    • Proposed as answer by BernieHunt Saturday, July 3, 2010 1:23 AM
    Friday, July 2, 2010 9:35 PM