top of page

How to Connect SQL Server to Power BI Report Builder to Create Paginated Report 

By - Ankit

 

Introduction:   

In this blog, we will learn how we can connect SQL Server to Report Builder, create a table in Report Builder to display our data, and to export that data. 

Power BI paginated reports are useful when we need our report in PDF/Excel format or want to print report data. 

Paginated report also provides us with the ability to produce highly formatted, print-ready layouts so, paginated reports are ideal for operational reports, like sales invoices. 

 

Connect SQL Server & create a table in Power BI Report Builder. 

 

  1. Open Power BI Report Builder 

Launch Power BI Report Builder. 


Red icon with a bar graph on a page, labeled "Report Builder App" on a dark background. No actions or people present.

 

 

  1. Create a New Report 

   Click on "Blank Report" option to create a new report. 


UI showing report options: Table, Chart, Map Wizard; and Blank Report. Left sidebar includes New Report, New Dataset, Open, and Recent.

 

  1. Add a Data Source  

    • In the Report Data pane, right-click on "Data Sources" and select "Add Data       source." 

    Report designer interface with "Add Data Source" highlighted. Sidebar shows folder options; screen says "Click to add title."
    • Choose a name for the data source. 

    • Select the connection type and choose "Microsoft SQL Server" as the connection type. 

 

Data Source Properties window with "DataSource1" name input and "Microsoft SQL Server" selected. Yellow highlights indicate selections.

 

  1. Configure SQL Server Connection  

    • Now click on “Build” then we will see a dialog box in where we will add our SQL Server name.  

 

Data Source Properties window showing connection options for DataSource1. Connection type: Microsoft SQL Server. Options for embedding.
  • Enter your SQL Server name and select the appropriate authentication method. 

  • Choose the database you want to connect (We are using Adventure workbook for this blog). 

  •  

SQL Server Connection Properties window showing server name, database list, and options for Windows and SQL Server authentication.

 

  • D. Click on "Test Connection" to ensure the connection is successful. 

  • E. Click "OK" to save the connection. 

 

SQL Server connection properties window: highlighted text shows server name "\SQLEXPRESS" and database "AdventureWorks2019". Options include authentication and test connection.

F. We will see the server's name and database name in the Connection string  

G. Then Click on Test Connection and then Ok 

 

 

Data Source Properties window showing connection settings for SQL Server, with options like "Test Connection" and a sample connection string.

 


  1. Add a Dataset  

Right-click on "Datasets" in the Report Data pane and select "Add Dataset." 

  

  

Report design interface with a menu open showing "Add Dataset" highlighted under "DataSource1". Background displays "Click to add title".

 

  1. Name dataset  

    • Choose the data source we created earlier. 

 

Dataset Properties window in software interface. Options for embedding a dataset, selecting a data source, and designing queries. Various buttons.
  •  Click "Query Designer" to retrieve the data or table you need. 

  • Query Designer window will appear. 

  • Expand “Tables” to see all of the tables. 

    


Query Designer interface with database folders like HumanResources, Purchasing visible. Red arrows highlight selecting fields. Background shows "Click" text.

 

    

  • Click on the check mark to select which data or column you want. We can expand the table to see the available columns from which a user can select the required columns.  The selected column will show in “Selected fields” 

 

Database query designer interface showing selected fields: Name, Color, Size, and ListPrice. Red arrows indicate selections.
  • Click "OK" when we are done selecting our data. 

     

  • Then we will see the SQL query; we can edit this query if needed. 

 


SQL query setup in a dataset properties window. Text box shows a query selecting product attributes from a database.

   

 

  •  Click "OK" to create the dataset. 

  •  

 We have successfully connected SQL Server to Power BI Report Builder and created a dataset. With our data source and dataset configured, now we are ready to start building our report. 

 

 

Now we will learn how we can create a table in Report Builder for a Paginated Report.   

  1. Create a Table 

    • Our Dataset is ready, now click on Insert Table from Insert Tab 

 

Software interface showing a report design screen. Left sidebar lists datasets: Name, Color, Size, ListPrice. Main area prompts "Click to add title."

After clicking on Insert Table, drag your mouse in the white screen to create a table. 

 

 

Report design software interface showing a table labeled "Header" and "Data." A sidebar lists datasets, including fields Color, Name, and Size.

 

  • Then, insert columns in the table by drag and drop. (Step: 2) 

 

Software interface for report creation featuring a table template in white. Dataset elements like Name and List Price are aligned with arrows.
  • To add a new column, right-click on the last column and then insert a column.  (Step: 2) 

 

 

Report design interface with toolbar, table insertion menu, and text "Click to add title." Dataset names listed on the left panel.

 

Now, our paginated report is ready with a simple table. 

  • Click on “Run” to see the report. 

 

Report design interface showing a company product table with columns for Name, Color, List Price, and Size. Gray and white theme.

Our paginated report is ready  

We can print this report and export. 

Spreadsheet interface showing a table titled "Company Product Name" with product details like name, color, list price, and size.
  • We get multiple options to export paginated report  

 

Spreadsheet interface shows a table of products with names, colors, list prices, and sizes. Export options include Word, Excel, PDF.

Congratulations! We have successfully connected your SQL Server to Power BI Report Builder, and created a dataset and a report. 

 

 

 

Comments

Rated 0 out of 5 stars.
No ratings yet

Add a rating
bottom of page