Friday, 26 August 2011

SSRS Reports Using Reports Wizards

1. Start a new Business Intelligence project in Visual Studio 2005. Then, from the menu, select Project > Add New Item. Select the Report Wizard option and call the file "FirstReportWZ.rdl". Click Add. Click Next on the Welcome screen and this will bring you to the Select the Data Source screen:



Select the New data source radio button and give the data source a name. Select Microsoft SQL Server as the type.


Tip: Use of the Shared data source option is actually a better option in most cases but, for the sake of this example, we will just create a new data source. We're going to set up a shared data source later in this article. 

Click the Edit button to bring up the Connection Properties dialog:




Enter or select a server name. The default is to log on using Windows Authentication. If you are using SQL Server Authentication, choose that setting, and enter the username and password. Finally, select a database, eg : ReportingDemo. Make sure you test the connection before you click OK.



Next up is the Design the Query screen. You can use the Query Builder by clicking the button at the top left, but in this case simply enter "Select * From Customer" into the Query string text box and click Next. On the Select the Report Type simply select the type you prefer (tabular or matrix) and hit Next.



This brings up the Design the Table screen:


Select State in the Available fields box and click the Group button. This will group the data in the result set by State. Select Next. On the Choose the Table Layout page, select the Stepped option and check the Enable Drilldown checkbox. On the next screen, choose a style for your report (I chose Ocean) and click Next.



This brings up the final screen, Completing the Wizard:




It shows a summary of your report options, and gives you an opportunity to rename the report and to preview it. Click Finish to end the wizard.



This is how your report will look in the standard Report Designer:
There are three tabs: Data, Layout and Preview. You should be on the Layout tab. Click on the Preview tab to view the report. Since this report doesn't take any arguments, it will run as soon as you click on the tab.




Use the +/- symbols next to the State abbreviations to expand and collapse the grouping of the report.

No comments:

Post a Comment