I know that it has been a while, and I apologize. I have been traveling around the U.S. evangelizing SQL Server to public schools, colleges and universities. Now that does not excuse my time away from the blog, but that is my excuse and I am sticking to it. Anyway, back to SSRS. If you have been following along you are ready to create your first report. That is exactly what I am going to demonstrate in this blog post.
To get started open the solution from the last post in this series, SSRS 101 – Creating a Shard Dataset. If you don’t have the project click HERE to download it. SSRS allows you create very simple reports and very complex reports. In this post I am going to create a very simple report that contains a single object and displays some data. In future posts I will expand on this report by adding additional visualizations.
Watch video if you prefer:
Creating Your First Report
- If you haven’t open the solution that I have been using throughout this series.
- Open the Solution Explorer if it is not open.
- Right-click the folder labeled Reports, select Add | New Item…
- Select Report from the Add New Item window that opens.
- In the textbox labeled Name enter Dashboard.rdl.
- Click the button labeled Add.
- Place your cursor on the new report that appears on the Design tab and left-click.
- In the menu select View | Report Data, which is the last item in the list.
- The Report Data window will appear. There are five folder available. I will discuss each at some point in this series. For now, right-click the folder labeled Datasets and select Add Dataset….
- The Dataset Properties window will open. In the textbox labeled Name enter SchoolAbsencesAndTardies.
- Ensure that the radio button labeled Use a shared dataset is selected.
- In the list of available shared datasets select Get_SchoolsAbsencesAndTardies_Aggr.
- Click the button labeled OK.
- The data set will now be displayed and all the columns that are available.
- In the menu bar select View | Toolbox.
- Select and drag a Matrix from the toolbox onto the report design surface.
- Open the Report Data window as explained in step 8. You could also simple click the report data tab, which should be located towards the bottom of the toolbox.
- Click School_Name and drag it into the column labeled Rows in the Matrix.
- Click School_Year and drag it into the column labeled Columns in the Matrix.
- Click Tardy and drag it into the column labeled Data in the Matrix.
- Expand the School_Name column a little so that can display the values on one row without wrapping.
- Click the Preview tab that is located directly above the report design surface.
- Since the Stored Procedure that we used in the dataset has a parameter so will the report. Before previewing the report you will be required to enter a value. Enter NW and click the button labeled Preview that is located to the right. Your report will execute.
- Save all of your work.
That’s it, your first report is created. In the next post I will explain how to customize the parameter to make it a little more user-friendly. Until then, happy report writing. As always, if you have any questions or concerns regarding this posts or any of the preview posts please feel free to email me at pleblanc@sqllunch.com.
Talk to you soon,
Patrick LeBlanc, Microsoft, Technical Solutions Professional SQL Server and Business Intelligence