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
alaa
NA
166
84.5k
Export Datagridview to Crystal Report in C# Windows
May 25 2015 7:31 AM
hi every body i read about Export Datagridview to Crystal Report in C# Windows it works fine but all of these have Crystal Reportviewer in the same form
and bind data to crystalreport using that code
DataSet ds = new DataSet();
DataTable dt = new DataTable();
dt.Columns.Add("proname", typeof(string));
dt.Columns.Add("price", typeof(decimal));
dt.Columns.Add("quantity", typeof(decimal));
dt.Columns.Add("total", typeof(decimal));
foreach (DataGridViewRow dgv in dataGridView1.Rows)
{
dt.Rows.Add(dgv.Cells[1].Value, dgv.Cells[4].Value, dgv.Cells[6].Value, dgv.Cells[7].Value);
}
ds.Tables.Add(dt);
ds.WriteXmlSchema("Print.xml");
this.dataGridView1.DataSource = null;
this.dataGridView1.Rows.Clear();
txtamountnumber.Text = "";
CrystalReportSells cr = new CrystalReportSells();
cr.SetDataSource(ds);
how can i bind the data to crystal report viewer in another form in button click not in the same form
Reply
Answers (
3
)
Report Viewer - Pagename & Parameters Settings
SSRS:Two sub Matrix Col Values addtion