February 15, 2016 at 11:45 am
I am using SSRS (the version that uses visual studio 2010 shell) and have been having a hard time adding multiple datasets to reports. Whenever I need to add a dataset, right now, my method has been to create a blank report, add the dataset and then copy the dataset code form the RDL. surely there has to be a better way to do this than what I am currently doing. I am sure this is probably something fairly easy to do, and that I am just missing something obvious, but I do not know what.
February 15, 2016 at 11:53 am
Once you create a dataset, you can convert it to a shared dataset. Shared datasets can be used in multiple reports, because they "belong to" the solution, not the individual report.
Once you've added your dataset to your report, you can right-click the dataset in design view and choose "Convert to Shared Dataset" from the context menu. Then you can create new reports using the existing datasets.
Hope that helps.
February 15, 2016 at 11:56 am
I'm sorry, I must not have been clear. I am trying to create a single report with multiple datasets, not multiple reports with a single dataset.
February 15, 2016 at 3:47 pm
Steve,
you can add as many datasets to your report as you like... the caveat is that you can only use one dataset at a time in a single tablix/matrix.
If you start with a blank report and add a Data Source, you can then create one or more datasets from whatever objects you can see inside the database (will depend on whether you have full rights to the database or not). You can add as many datasets as you want. Just right-click the DataSets folder and select Add DataSet... from the menu. (the only option you'll have). If the data source for the second dataset is not in the same database as the first, you can just add another data source.
If you need to grab some columns from the dataset from dataSource A and some from the dataset from dataSource B, you would have to use LOOKUP or LOOKUPSET. It's usually easier to handle all that in your query (if you're allowed to create stored procedures in your database, I would do it there).
Does that answer your question?
Pieter
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply