Tech
Forums
Jobs
Books
Events
Videos
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
1
Answer
An exception of type 'System.Runtime.InteropServices.COMExce
Methoun Ahmed
7y
180
1
Reply
Here is my code :
con.Open();
SqlCommand cmd = new SqlCommand("SELECT * FROM tblReport WHERE Date between '"+strDate+"'and'"+endDate+"'",con);
SqlDataAdapter da = new SqlDataAdapter();
da.SelectCommand = cmd;
DataTable dt = new DataTable();
da.Fill(dt);
con.Close();
ReportDocument crypt = new ReportDocument();
crypt.Load(@"F:\Project C#\Project ASP.Net\IT Report 2013\IT Application\IT Application\ITReport.rpt");
crypt.DataDefinition.FormulaFields["DateForm"].Text = "'" + strDate.ToString() + "'";
crypt.DataDefinition.FormulaFields["DateTo"].Text = "'" + endDate.ToString() + "'";
crypt.SetDataSource(dt);
CrystalReportViewer1.ReportSource = crypt;
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
How do i bind 4 tab in a loop.
how to get sunday date for a month