How do I use multiple datasets in the body of a report?

  • I'm working on a report that would best be handled by having multiple related datasets. Essentially, its a report of our customer's activities, with various different breakdowns. The unifying element is, naturally, the customer ID.

    For instance, I need to have one data region that reports on the customer's discreet retail purchase activities, another that reports on the customer's time usage by date (how much time they used, with different types of time usage accounted for), another that sums total expenses, etc. The kicker is, when run, the report doesn't report on a single customer, it reports on all customers, one per page. (Its almost like the paysheet you'd develop for commission + salary employees, only its cost plus time charges).

    I can build the individual related datasets easily, I can't figure out how to get them onto the report and stay related to one another, and aside from telling me that I can use multiple datasets in the body of a report, I haven't found any help in MS's documentation.

  • The way I would do this is to use a sub-report.

    Set up a table on your report and decide which dataset will populate the left side of the report, and add this to the columns on the left.

    You probably then need one column on the right that will contain the sub-report, you can pass the customerId to the sub-report as a parameter. The sub-report should print the data from the second dataset.

    One more hint, if you have multiple columns for your second dataset, set up all of those columns in your main report and add the headings to those columns. Then in the detail section MERGE all of those columns and call the sub-report from the one single column. Lining up the data from the sub-report with the column headings in the main report is just a matter of trial and error.

    Good luck.

    Nigel West
    UK

  • I didn't have any issue with data sets until I added more than 2 to a page (1 for the param listing) and one for the displayed data set... Everytime I added a third dataset the whole report quit working. the dataset/query was valid.... I solved this by creating a subreport and all's well.... does anyone know why this issue came up with the third dataset?:crazy:

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply