marvelTracker
marvelTracker

Reputation: 4969

Bind different datasource to inner table in RDLC

I'm working with RDLC reporting, and have experienced a scenario related to hierarchical data binding.

I need to list customers and their order as follows,

Customer Name:A
   OrderID:1
   Order Description:test1
   Products:aa, bb,

   OrderID:2
   Order Description:test2
   Products:cc, dd,

Customer Name:B
   OrderID:233
   Order Description:test 3
   Products:ef, gh

So, I have used outer table for displaying customers and inner table for displaying related orders.After doing that, however, I'm unable to bind different data source for inner table , because it is already bind to outer table's data source.

Is it possible to bind a different data source to inner table or Are there any alternatives to do so ?

Upvotes: 0

Views: 964

Answers (2)

marvelTracker
marvelTracker

Reputation: 4969

This can be achieved by using sub reports, as there is an option to load a sub-report by giving .rdlc file name at run time. As a result, we could give separate data source for the sub-report. For example, According to customer id, we could bind order data source with execution of sub-report generating event. If anyone interested in the code, I would publish it.

Upvotes: 0

Phil
Phil

Reputation: 4092

I don't think its possible from memory, I had a similar problem with relational data.

My solution was to make it into one dataset and that got around the binding problem.

An alternative would be to allow users to "drill" down into a separate report that shows those orders per customer?

Upvotes: 1

Related Questions