Through-out the article we will learn step-by-step: How to retrieve the values from the database and show it into the RDLC Report using Dotnet Framework.
we will learn step-by-step: How to retrieve the values from the database and show it into the RDLC Report using ASP.NET.
In these days, Dotnet framework is most growing framework and as a developer I am curious to know and learn about the new features of this framework.
From last couple of days I was wondering How can retrieve the values from the database and show it into the RDLC Report using parameters in ASP.NET. For the same I have gone through various forums etc. Unfortunately, I did saw very few posts/articles for the same.
Finally, I tried and came with a solution to perform retrieve the values from the database and show it into the RDLC Report from Server side . In this article, I am going to share my findings with all of you.
Ah! This question came to my mind while I was finding the solution of my problem, I jotted down few points and finally
called them as a steps to perform How to retrieve the values from the database and show it into the RDLC Report using ASP.NET the database Operations.
To implement the solution and to feel the taste of code, you should:
Have Visual Studio 2012 or later with the support of VS
Have Basic Idea of SQL Server
Have Basic Idea of Sql queries
start->Create new Project -> Asp.net Web Forms Application and Given File name then click ok
How to Add New --> Web Form given name click add button
How to Add Dataset
Right Click the Click Add-> New Item -> Data -> Dataset Given name and click add button
Final output this
Report Generate Aspx Page this
<rsweb:ReportViewer ID="ReportViewer2" runat="server" Visible="false" Height="687px" Width="1045px">
Server Side Code
ReportViewer2.Visible = true;
using (SqlConnection con = new SqlConnection(strCon))
SqlDataAdapter sqladp = new SqlDataAdapter("Select * from tblProducts where EmpName like '%"+ TxtName.Text +"%'", con);
ReportViewer2.ProcessingMode = ProcessingMode.Local;
ReportViewer2.LocalReport.ReportPath = Server.MapPath("~/Report1.rdlc");
ReportDataSource rds = new ReportDataSource("DataSet1", dt);
catch (Exception ex)
Hope it will helpful to you