Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
And with the same idea as creating shared data sources, we can also create shared datasets. Now, this is not quite as common across the board, as you are more likely to need different datasets across different reports, but they can be useful. Now as with creating other modular components like shared data sources or report parts, I like having a folder to put my shared data sets in to make them easy to find. So just create a new folder here, share Data Sets, and while we created a new data source from this window, we actually go back into Report Builder to create a shared dataset.
So I'll open up Report Builder, but I'm not going to create a report because on the Getting Started page is another option we haven't seen yet. None of the wizards, it's the second one on the left here, the New Dataset. Now the first think it's going to ask for is to choose a shared data source connection. Shared datasets must use a shared data source so creating the shared data source comes first. I have already used this data source in Report Builder, which is why it's showing up here. If I wanted to connect to another one that I just created, I can browse other data sources. But this is fine.
It's the one I want, so I am going to click Create. And really, it just opens up a full-screen version of the Query Designer. We are using the data source, in this case connecting to AdventureWorksLT. I can drill down onto something simple. I'll go and create ProductName, ListPrice and Color, connect that to the ProductCategoryTable. Just as like creating a normal dataset, we have all these features like auto detection of relationships. I can go ahead and run this query. I can edit it as text if I want to go want to go against the raw SQL.
If I accidentally selected the wrong connection, I could use this Select button to point to a different one, but I am connecting to the right one right now. The only other button I have that's new is this one, Set Options, which is the same as right-clicking the dataset and viewing the properties of it, allowing us to change the names of the fields, provide parameters, provide filters, and so on. I don't need to do anything there; I just want a simple dataset. The last thing I need to do is come up here and click the Save button. Shared datasets can be saved anywhere on the Report Server, but I'm doing to go into the Shared Datasets folder I created a moment ago and save it there.
Just give it a more useful name, and we are done. From this point on, when I create a new report in Report Builder, it will be available as an option. And bear in mind, we already define that using a shared data source, so it makes the process even quicker. If I go ahead and say that I'm creating new report based on the Table Wizard, instead of creating a dataset, I am just going to point to a shared dataset. I'll browse to that one that one that I just created, and I am done. The dataset is there, the data source is there; all I now need to do is drag the fields into the right parts of the table.
I'll get product information grouped together by category name, and we are done. Sure, it might need a little formatting, but it's off to a really good start, and a really fast way to start creating these reports. As with shared data sources, as soon as I create a new report, it's going to be even quicker to access that one. If I use the Table Wizard, even the first screen is going to point to that shared dataset and basically I'm already there, ready to format the table. Now, one great reason for using shared datasets is if you're creating multiple versions of the same report, one perhaps focused on the web making the most of interactive controls and one for printing.
But they are also great if there is just a common query that might be tedious to keep rewriting. Shared datasets are editable. You can just go into the particular folder that you had, view the details of it, change the name of it, or use the dropdown menu to open it back up in Report Builder and change any details about them.
Get unlimited access to all courses for just $25/month.Become a member
61 Video lessons · 93629 Viewers
82 Video lessons · 104405 Viewers
71 Video lessons · 76591 Viewers
56 Video lessons · 107916 Viewers
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.