Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
After publishing your first report parts, if you didn't have a Report Parts folder visible in your report manager, you should have one now. To use these I'm just going to go ahead and create and create a normal report using Report Builder, as we usually would. As ever, I'll do a blank report, but this time I'm not going to add a data source. I'm not going to add a dataset. I don't need to. I just want to add some report parts to this new report. So I'll go over to my Insert tab and now click this Report Parts button. It opens up what's called the Report Part Gallery.
Now, this could theoretically have hundreds or thousands of report parts in it. They're searchable, and it'll go through the name and the description, so I could type in "customer" for example and I would bring back this customer table with a little preview of it. Click it once, I get the description. It's a simple list of customers. Though at this point, if I just left that search field blank and just clicked the Search button, I would get everything that existed, which is both my customer table and my address text. And all I do is drag it on. So I've drag on the customer table here, and I need to just reposition it a bit, and then I'll drag on the address text as well.
Let's go and prove this works, click Run. It works just fine. You see, when you drag on that report part, what is also done is automatically add the embedded data source and the embedded dataset that that table originally contained. Everything it needs to work is automatically added to this new report, but I can still go through and change this table to my heart's content. If I wanted to select that top row and change the background color, it's not a problem; if I wanted to even delete the column from the end, not a problem either.
I can make any changes that I want to. It has copied the information from the published report part into my new report. Now, whatever change I make here is not overwriting the report part on the server unless I wanted it to, in which case I could republish this part, either overwriting the existing one or publishing as a new one. And this is how you publish and reuse report parts. Now, if I have published a report part and then used in multiple other reports, what happens if a change to this report part is made over here in this Report Part gallery? Well, let's take a look.
I am going to open up the original report that I'd used to publish that report part. Now, I don't need to actually have the original one. I could overwrite or update that report part from anywhere. This is just a good example so we can see what's going to happen. This report is of course working just fine right now. What I'm going to do is make a small change to order by last name ascending, which it currently isn't doing. And I'm also going to change the text report part here from 22 Acacia Avenue to 44. I'll make those changes normally.
First selecting the table, I am going into the Tablix Properties. I'll just add a sort LastName, A to Z. Test it. It seems to work just fine. I'll make one change to the text over here and that works too, so let's republish these. Up to the Office button, Publish Report Parts, just review them before publishing. If I open up these, we get a bit of information that it understands these have already been published. So we do get a checkbox asking if I want to publish as a new copy of the report part, perhaps to a different location. I don't want to do that; I just want to overwrite what's there.
So I'll click Publish and we're done. Click Close. No change will be visible here because I've already made those changes, but I'm now going to switch into the other report. Now, if I'd save this to the server and then reopened it, it what actually prompt me and tell me that there were changes to these report parts, and did I want to copy down the changes? It won't overwrite them if I don't want to. So if I want to keep my customize report part, I just keep it. Because I already have this report open, I'm not getting prompted, but I can go up to the Office button here and select the option to Check For Updates. Clicking that I get this prompt up at the top that 2 publish report parts in this report have been updated on the server.
I can click View Updates and it's figured out there are changes to both, including I can even see the 44 Acacia Avenue. It will not overwrite my changes unless I tell it to do so, so I can select either both of these options or I can select just one or the other. I am going to select both and click Update. Close and you can see that those changes have been copied back into my new report. We have got 44 Acacia Avenue. And now if I run this report, I've even got the sorting being applied by last name. So, well these changes won't be enforced upon any report that uses report parts, it's very useful to have that notification.
Get unlimited access to all courses for just $25/month.Become a member
82 Video lessons · 98339 Viewers
61 Video lessons · 85635 Viewers
71 Video lessons · 69576 Viewers
56 Video lessons · 101906 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.
Your file was successfully uploaded.