TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Gary Sanford
NA
3
6.1k
Binding a reportviewer to sql datareader
Apr 27 2011 12:45 PM
I created a report using a binding source and dataset using the wizard. The report runs ok.
I want to change the bindingsource to a dataset that I create.
this is my code:
SqlConnection sqlconn = new SqlConnection(connStr);
string rptwhere = " select * from MTA_WIP where CustID='009'";
System.Data.DataTable jdtl = new System.Data.DataTable();
SqlDataAdapter jdtla = new SqlDataAdapter(rptwhere, sqlconn);
DataSet jdtls = new DataSet();
try
{
int idtlcount = jdtla.Fill(jdtls);
}
catch (SqlException)
{
}
jdtl = jdtls.Tables[0];
this.MTA_WIPBindingSource.DataSource = jdtl;
this.reportViewer1.RefreshReport();
I'm not getting any errors but I'm not getting any data on the report either.
I can step through each line and see that I am getting 31 rows of data in jdtl as I should but I get a blank report.
What am I doing wrong?
thanks,
Reply
Answers (
2
)
Display master detail report with filter clause in crystal report VS 2008
Crystal Report Generating error for push model while printing or exporting