Is it possible to have 2 data sets and display the data for them in one chart on an SSRS report or will I need to combine the data sets?
I have number of calls answered in one dataset and number of calls missed in another and want to show them both in a graph. The data is held in different areas which is why I didn't create it in one data set to start with.
SSRS Shared DataSetsShared Dataset can be used by multiple reports.
You can't use a single SSRS result set to call a proc that returns multiple result sets and access it as a collection of result sets the way you can in . net. Once you have your multiple result sets created, you can create multiple tablix on your report, and designate in each one which result set it uses for its data.
This may not work for all types of charts, and does require your datasets to be constructed with common axis values:
Select the chart so that the "chart data" panel appears.
Click the green "+" above the "Values" pane. You'll see a list of fields in the dataset bound to the charts data region. Rather than choosing any of those, choose "Expression" on the very bottom.
Add a value from your other dataset - note that it will probably need to be wrapped in an aggregate function, like SUM or FIRST. For example:
=sum(Fields!YourField.Value, "2ndDatasetName")
All datasets will need to have common axis values, otherwise you're in for a bad time. If you need to split them up, you can have TWO sets of axis values for each orientation (vertical, horizontal); to change which axis position is used, bring up the "Series Properties", choose the 2nd tab on the left ("Axes and Chart Area"), and choose the Primary or Secondary axis accordingly.
You can use Lookup function to join two data-sets on common field (i.e. DateTime) and then drive part of the chart from first data-set and part from the other. It's like INNER JOIN in T-SQL. I tested it in my project and it works.
Source: http://www.techbrothersit.com/2016/01/how-to-display-data-on-single-tablix.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With