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
Angel Princess
NA
100
47.3k
How to print datetimepicker to crystal report?
Jul 17 2015 5:22 AM
CommPercent objC = new CommPercent();
objC.MdiParent = this.MdiParent;
DataSet ds = new DataSet();
DataTable dt = new DataTable();
dt.Columns.Add("Date", typeof(String));
dt.Columns.Add("OPDNo", typeof(Int32));
dt.Columns.Add("Patientname", typeof(String));
dt.Columns.Add("Group", typeof(String));
dt.Columns.Add("Test", typeof(String));
dt.Columns.Add("Result", typeof(String));
dt.Columns.Add("Units", typeof(String));
dt.Columns.Add("Cost", typeof(Decimal));
dt.Columns.Add("Comm", typeof(Decimal));
foreach (DataGridViewRow dgr in dgv_Patients.Rows)
{
dt.Rows.Add(dgr.Cells["Date"].Value, dgr.Cells["OPDNo"].Value, dgr.Cells["Patientname"].Value, dgr.Cells["Group"].Value, dgr.Cells["Test"].Value, dgr.Cells["Result"].Value, dgr.Cells["Unit"].Value, dgr.Cells["Cost"].Value, dgr.Cells["Comm"].Value);
}
ds.Tables.Add(dt);
CommisionPercent cr = new CommisionPercent();
cr.SetDataSource(ds);
objC.crystalReportViewer1.ReportSource = cr;
objC.crystalReportViewer1.Refresh();
objC.Show();
This is for datagridview. I also want to print FromDate and ToDate from datetime picker. How to do it?
Reply
Answers (
3
)
edit link column added every time edit link is clicked
adding panel dynamically on button click