How to Add and Design Report Viewer (RDLC) in ASP.Net

In ASP project, if you want to view report, then you have to use ReportViewer or any other Reporting Tools. In this post, SKOTechLearn will explain the steps How to Add Report Viewer in ASP.Net? and also describe the process to Design ReportViewer (RDLC) in ASP.Net.

Reading to this tutorial, there is short UI process to understand about report in ASP.
RDLC ReportViewer Process in ASP.Net
RDLC ReportViewer Quick Process

Pass Parameter with Image in Report Viewer in ASP.Net.

Here we will understand Report process in Two ways.
Add Report Viewer on Existing Form.
Add Report Viewer on other Web Form.

Now, we start step by step procedure for understand.

Step1. Add Web Form and RDLC Report in ASP.Net Project:

First add a web Form in Project then add Report in your application like following steps.

➤ Right Click on Project from Solution Explorer

➤ Find “Add” option and move cursor on it

➤ Next to reach “New Item…” and click on it.

“Add New Items” Screen will appear

➤ In this screen, left side Pane contain "Installed Templates”.

➤ Find “Reporting” Option and select on it.

➤ From “Reporting”, select “Report” option

➤ Then Click on “Add” button.

    These process is described in bellow given figure.
    ReportViewer Control Adding Process
    Report (RDLC)Adding Process
    When you complete these process of adding report on project. “Report1.rdlc” will be add on your project. It will seen inside Solution Explorer screen.

    Learn How to Add Bullet List in ASP.Net with Easy Tips?


    This is the way to add RDLC. There are another process and some more steps to view the report.

    Note: “Report1.rdlc” need the platform where it display the designed template. So, you have to use “ReportViewer” control.


    Step2. Add ReportViewer with Settings:

    After that open “WebForm”. In your Form choose location wherever you want to add “ReportViewer” control. For adding this control on Form, follow the process given bellow:

    Move cursor on “Toolbox” screen to the left side of project.

    Find “Reporting” header and click on it.

    It will show two options (“Pointer” and “ReportViewer”) control options.

    Select “ReportViewer” option and drag on Form’s Location.

    Increase or Decrease this control size according to need.

      ReportViewer with Setting
      Control with Settings
      After that, click on “Tasks” option to this control as describe in above image.

      It will show ‘Choose Report’ combo, select report RDLC which you have create in previous step.

      Now this control will call that particular RDLC.

      Add Menu with Sub-Menu in ASP.Net.


      Step3. Design RDLC Report in ASP.Net:

      Now, let’s Design RDLC Report. For designing process when you right click, the drop down menu will show an option with name "Insert". You can insert some control in RDLC like TextBox, Rectangle etc. And design it according to requirement.
      Insert control on RDLC form
      Insert control on RDLC Form
      After this process run your application. But, when you debug application, you will find an error appearing on Web browser.

      Report Viewer Web.UI.ScriptManager Error in ASP.Net (Solution)


      Error during Execution of Web application:
      Error during application run
      Error during application run

      Why this error occur?

      Lets read error. It says about missing UI.ScriptManager Error. So, we have to add ScriptManager in ASP.Net webform.

      Where to find and How to add ScriptManager in ASP Form?

      There are following way to solve above question.


      Step4. Add ScriptManager in ASP.Net:

      Find “AJAX Extensions” header  from “Toolbox” screen.

      In this header find “ScriptManager”.

      Drag and drop “ScriptManager” on Form.

        Add ScriptManager in ASP.Net
        Add ScriptManager
        After inserting this web control, it will reduce the error which was appearing during run-time.

        How to Design Header, Footer and Sidebar in ASP.Net?


        Step5. Run Web Form:

        Now run Web Form. You will find that there is no error and the output will looks like bellow.
        Report Output in ASP.Net
        Report Output
        So, this post final conclusion is that you have to remember about add “RDLC”, “ReportViewer” web control, “ScriptManager” web control and Inset controls into RDLC for creating or designing Report in ASP.Net by SKOTechLearn Tips.

        Also Learn:

        What is Master Page and How to Implement in ASP.Net?

        0 comments: