.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month

Home >> Forum >> C# >> Post New QuestionBookmark and Share Subscribe to Forum

About Reportviewer

Posted By: Vikramraj     Posted Date: January 04, 2011    Points:2   Category :C#
I have query about Reportviewer in microsoft visual studio 2010 working in c#.net.

Adding report1.rdlc to project
While Adding it automatically asks for the Choose Dataset and giving facility to create new dataset.

but i am using following code

ReportViewer1.ProcessingMode = ProcessingMode.Local;

ReportViewer1.LocalReport.ReportPath = "Report1.rdlc";

ReportDataSource rdS = new ReportDataSource("DataSet1_students", GetData());


public DataTable GetData()


SqlDataAdapter dta = new SqlDataAdapter();

SqlConnection con = new SqlConnection("Data Source=local;Initial

Catalog=master;Integrated Security=True");

DataSet ds = new DataSet();

SqlCommand cmd = new SqlCommand("SELECT studentid AS StudentId, sidno AS

SidNo, sname AS SName, Qualification FROM students", con);

dta.SelectCommand = cmd;

dta.SelectCommand.Connection = con;

dta.Fill(ds, "students");

return ds.Tables[0];


Problem is not getting Data in report1.rdlc

Author: Narayanan             
Posted Date: January 18, 2012     Points: 20   

Post Reply

You must Sign In To post reply
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend