---
title: "MicrosoftReportViewer Control in ASP.Net"  
description: "MicrosoftReportViewer control is used to generate report.  Steps to generate report using MicrosoftReportViewerDrag and Drop MicrosoftReportViewerDrag"  
author: "John Smith"  
published: 2010-12-03  
updated: 2020-03-04  
canonical: https://www.mindstick.com/articles/207/microsoftreportviewer-control-in-asp-dot-net  
category: "asp.net"  
tags: ["asp.net"]  
reading_time: 2 minutes  

---

# MicrosoftReportViewer Control in ASP.Net

MicrosoftReportViewer [control](https://yourviews.mindstick.com/view/83439/bipartisan-gun-control-bill-passed-in-us-after-decades) is used to generate report.\

## Steps to generate report using MicrosoftReportViewer

[Drag and Drop](https://www.mindstick.com/forum/454/how-to-drag-and-drop-multiple-image-from-one-canvas-to-onther-canvas-in-html5) MicrosoftReportViewer

![MicrosoftReportViewer Control in ASP.Net](https://www.mindstick.com/mindstickarticle/202f738f-5fb1-4e43-9b8b-cd8bc460e96c/images/e4a362e8-5d20-4216-b8b9-1d3f78adbd79.png)

Drag and Drop ObjectDataSource

![MicrosoftReportViewer Control in ASP.Net](https://www.mindstick.com/mindstickarticle/202f738f-5fb1-4e43-9b8b-cd8bc460e96c/images/6c09d25f-f813-4b1b-9eb6-50a9ec938fff.png)

Now click on the Design a new report task which open Report Wizard window as shown in the figure.

![MicrosoftReportViewer Control in ASP.Net](https://www.mindstick.com/mindstickarticle/202f738f-5fb1-4e43-9b8b-cd8bc460e96c/images/386c3c85-6e61-4591-a48b-0ffe50e6e4ef.png)

Click Next

![MicrosoftReportViewer Control in ASP.Net](https://www.mindstick.com/mindstickarticle/202f738f-5fb1-4e43-9b8b-cd8bc460e96c/images/b0201cbf-b92f-4e42-a721-97430d15543f.png)

Click new [connection](https://yourviews.mindstick.com/view/83497/a-40-year-old-man-has-been-arrested-in-connection-with-the-abe-shooting)

![MicrosoftReportViewer Control in ASP.Net](https://www.mindstick.com/mindstickarticle/202f738f-5fb1-4e43-9b8b-cd8bc460e96c/images/8821e9b9-5eed-4d5a-9a22-62f178de41a7.png)

![MicrosoftReportViewer Control in ASP.Net](https://www.mindstick.com/mindstickarticle/202f738f-5fb1-4e43-9b8b-cd8bc460e96c/images/6de492e9-c431-49bb-bd27-37dcd4c1e0de.png)

Select your [server name](https://answers.mindstick.com/qa/110129/how-to-change-discord-server-name), select [Sql Server](https://www.mindstick.com/articles/34/create-table-in-microsoft-sql-server) [Authentication](https://www.mindstick.com/blog/177/authentication-and-authorization-in-asp-dot-net) and enter [username](https://www.mindstick.com/forum/12798/there-is-no-viewdata-item-of-type-ienumerable-selectlistitem-that-has-the-key-username) & [password](https://www.mindstick.com/blog/118/retriving-user-password-by-using-stored-procedure-in-asp-dot-net) and select your [database](https://www.mindstick.com/articles/71/how-to-create-xml-file-of-database-in-c-sharp) name then click OK

![MicrosoftReportViewer Control in ASP.Net](https://www.mindstick.com/mindstickarticle/202f738f-5fb1-4e43-9b8b-cd8bc460e96c/images/10103118-a484-4ecb-b97c-40030138d672.png)

Click next

![MicrosoftReportViewer Control in ASP.Net](https://www.mindstick.com/mindstickarticle/202f738f-5fb1-4e43-9b8b-cd8bc460e96c/images/a4eac9b8-65f5-4bef-85a9-5ee4a3339f98.png)

Click yes

![MicrosoftReportViewer Control in ASP.Net](https://www.mindstick.com/mindstickarticle/202f738f-5fb1-4e43-9b8b-cd8bc460e96c/images/aa7e6bef-5acf-460c-9656-275c04187bb0.png)

Click Next

![MicrosoftReportViewer Control in ASP.Net](https://www.mindstick.com/mindstickarticle/202f738f-5fb1-4e43-9b8b-cd8bc460e96c/images/c88935fa-37b7-4e87-b2cc-05c0457497db.png)

Click Finish

![MicrosoftReportViewer Control in ASP.Net](https://www.mindstick.com/mindstickarticle/202f738f-5fb1-4e43-9b8b-cd8bc460e96c/images/348762d1-6eda-4aa8-87e4-70f009955471.png)

Click Next

![MicrosoftReportViewer Control in ASP.Net](https://www.mindstick.com/mindstickarticle/202f738f-5fb1-4e43-9b8b-cd8bc460e96c/images/03c947ec-e7c6-4db8-8bea-40650dda0333.png)

Click Next

![MicrosoftReportViewer Control in ASP.Net](https://www.mindstick.com/mindstickarticle/202f738f-5fb1-4e43-9b8b-cd8bc460e96c/images/5de6f982-ecdf-4ea3-8b64-920864ebb5b5.png)

Click details until available fields not null

![MicrosoftReportViewer Control in ASP.Net](https://www.mindstick.com/mindstickarticle/202f738f-5fb1-4e43-9b8b-cd8bc460e96c/images/08a9935c-1d62-4309-89b2-d99feffb0188.png)

Click Next

![MicrosoftReportViewer Control in ASP.Net](https://www.mindstick.com/mindstickarticle/202f738f-5fb1-4e43-9b8b-cd8bc460e96c/images/1acb9804-1a19-45ca-971e-b6f0aaa4b7b4.png)

Click Next

![MicrosoftReportViewer Control in ASP.Net](https://www.mindstick.com/mindstickarticle/202f738f-5fb1-4e43-9b8b-cd8bc460e96c/images/521cb226-fd63-4d14-8d0b-0b10cf0fde19.png)

Click Next

![MicrosoftReportViewer Control in ASP.Net](https://www.mindstick.com/mindstickarticle/202f738f-5fb1-4e43-9b8b-cd8bc460e96c/images/c6138394-31c6-42a1-941d-785a103a6dab.png)

Click Finish

![MicrosoftReportViewer Control in ASP.Net](https://www.mindstick.com/mindstickarticle/202f738f-5fb1-4e43-9b8b-cd8bc460e96c/images/8b539d40-2f62-4ea2-8e46-9401ae1a5132.png)

![MicrosoftReportViewer Control in ASP.Net](https://www.mindstick.com/mindstickarticle/202f738f-5fb1-4e43-9b8b-cd8bc460e96c/images/e179ef12-d3aa-43b2-aa66-6083cef4c95f.png)

Click Configure Data Source

![MicrosoftReportViewer Control in ASP.Net](https://www.mindstick.com/mindstickarticle/202f738f-5fb1-4e43-9b8b-cd8bc460e96c/images/3f4b1e66-a5d6-4579-9ee9-6b6ce94e978c.png)

![MicrosoftReportViewer Control in ASP.Net](https://www.mindstick.com/mindstickarticle/202f738f-5fb1-4e43-9b8b-cd8bc460e96c/images/b99fd2e8-07ce-47ff-aad2-5ec76bfb0b71.png)

Click Next

![MicrosoftReportViewer Control in ASP.Net](https://www.mindstick.com/mindstickarticle/202f738f-5fb1-4e43-9b8b-cd8bc460e96c/images/63c43931-39dd-4e36-8b97-0625e7cb278d.png)

Click Finish

![MicrosoftReportViewer Control in ASP.Net](https://www.mindstick.com/mindstickarticle/202f738f-5fb1-4e43-9b8b-cd8bc460e96c/images/dc53de06-f4a1-4ad2-90a1-a9c19f50604f.png)

Now choose report from ReportViewer Tasks

![MicrosoftReportViewer Control in ASP.Net](https://www.mindstick.com/mindstickarticle/202f738f-5fb1-4e43-9b8b-cd8bc460e96c/images/991983cf-d75b-4a82-a507-bedb3faafec6.png)

Now [execute](https://www.mindstick.com/interview/49/how-can-i-execute-a-php-script-using-command-line)

![MicrosoftReportViewer Control in ASP.Net](https://www.mindstick.com/mindstickarticle/202f738f-5fb1-4e43-9b8b-cd8bc460e96c/images/772c4fec-69be-4e9e-bd53-c6f0b358a9b8.png)

## Generated Code:

```
    <rsweb:ReportViewer ID="ReportViewer1" runat="server" Font-Names="Verdana"          Font-Size="8pt" Height="400px" Width="400px">         <LocalReport ReportPath="Report1.rdlc">            <DataSources>                <rsweb:ReportDataSource DataSourceId="ObjectDataSource1"                     Name="myDataSet_insert_reg" />            </DataSources>         </LocalReport>     </rsweb:ReportViewer>         <asp:ObjectDataSource ID="ObjectDataSource1" runat="server"          OldValuesParameterFormatString="original_{0}"  SelectMethod="GetData"          TypeName="myDataSetTableAdapters.insert_regTableAdapter">    </asp:ObjectDataSource>
```

![MicrosoftReportViewer Control in ASP.Net](https://www.mindstick.com/mindstickarticle/202f738f-5fb1-4e43-9b8b-cd8bc460e96c/images/5ed6a216-79a7-49ba-9f7a-aa0fb676de06.png)

---

Original Source: https://www.mindstick.com/articles/207/microsoftreportviewer-control-in-asp-dot-net

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
