SQL is the standard language for relational database management systems. It stands for Structured Query Language. Through SQL, users can create, edit and run queries on a SQL database. Users can create reports of the results achieved through running queries in SQL. These reports are a sorted and organized collection of the results obtained through the entire exercise. In this blog post, you will learn to create a SQL report by using MS SQL reporting tools. Follow the steps below to create a report server project on MS SQL.
Step 1: Create
- Launch SQL Server Data Tools.
- Click on the File button, and locate âNewâ and point at it. Click on the âProjectâ button you see.
- In the New Project window, on the left, you will spot a menu pane. Click on âInstalledâ, mouse over to âTemplatesâ and then âBusiness Intelligenceâ. You will see âReporting Servicesâ. Click on it.
- Click on âReport Server Projectâ. Type in a name for your project, then click on âOKâ to create a project.
Step 2: Connect
- Find the âReport Dataâ pane, and click âData Sourceâ under âNewâ.
- Ensure that you have selected âEmbedded Connectionâ.
- Select âMS SQL Serverâ in âTypeâ.
- Type [ Data source=localhost; initial catalog=AdventureWorks2014 ] in âConnection Stringâ.
- Select âWindows Authenticationâ with âCredentialsâ.
- Click âOKâ.
Ste 3: Define
- Select âDatasetâ under âNewâ in the âReport Dataâ pane.
- Type a name in the box, and click âUse a dataset embedded in my reportâ.
- Select data source created in step 1.
- Enter âQuery Typeâ text.
- Type the Transact-SQL query.
- Click OK.
Step 4: Add
- Use the âTableâ option in the âToolboxâ menu to draw a table.
- Use the âReport Dataâ pane to expand the dataset.
- Use the drag function on the mouse to set various fields in the table cells.
- Click âPreviewâ tab.
Step 5: Format
- Point at the value in any cell you wish to format, then right click.
- Select from the list of drop-down options the kind of formatting you wish to apply to values in the cell.
Step 6: Group
- Activate âDesignâ tab.
- Drag various fields to âRow Groupsâ setting to start grouping.
- Mathematical functions can be launched through âDesignâ view.
Follow the steps above to create MS SQL report by using various tools.