Home > DeveloperSection > Articles > MicrosoftReportViewer Control in ASP.Net

MicrosoftReportViewer Control in ASP.Net


ASP.Net ASP.Net 
Ratings:
0 Comment(s)
 6519  View(s)
Rate this:

MicrosoftReportViewer Control in ASP.Net

MicrosoftReportViewer control is used to generate report.

Steps to generate report using MicrosoftReportViewer

 

Drag and Drop MicrosoftReportViewer

MicrosoftReportViewer Control in ASP.Net

Drag and Drop ObjectDataSource

MicrosoftReportViewer Control in ASP.Net

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

MicrosoftReportViewer Control in ASP.Net

Click Next

MicrosoftReportViewer Control in ASP.Net

Click new connection

MicrosoftReportViewer Control in ASP.Net

 

MicrosoftReportViewer Control in ASP.Net

Select your server name, select Sql Server Authentication and enter username & password  and select your database name then click OK

MicrosoftReportViewer Control in ASP.Net

Click next

MicrosoftReportViewer Control in ASP.Net

Click yes

MicrosoftReportViewer Control in ASP.Net

Click Next

MicrosoftReportViewer Control in ASP.Net

Click Finish

MicrosoftReportViewer Control in ASP.Net

Click Next

MicrosoftReportViewer Control in ASP.Net

Click Next

MicrosoftReportViewer Control in ASP.Net

Click details until available fields not null

MicrosoftReportViewer Control in ASP.Net

Click Next

MicrosoftReportViewer Control in ASP.Net

Click Next

MicrosoftReportViewer Control in ASP.Net

Click Next

MicrosoftReportViewer Control in ASP.Net

Click Finish

MicrosoftReportViewer Control in ASP.Net

MicrosoftReportViewer Control in ASP.Net

Click Configure Data Source

 

MicrosoftReportViewer Control in ASP.Net

 

MicrosoftReportViewer Control in ASP.Net

Click Next

 

MicrosoftReportViewer Control in ASP.Net

Click Finish

MicrosoftReportViewer Control in ASP.Net

 

 

 

 

Now choose report from ReportViewer Tasks

MicrosoftReportViewer Control in ASP.Net

Now execute

MicrosoftReportViewer Control in ASP.Net

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


Don't want to miss updates? Please click the below button!

Follow MindStick