Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
3
Reply
Crystal report is not loading from the specified path
mohammed zubair
Dec 4 2017 1:42 AM
155
Reply
When I am trying to load the crystal report in the windows form, the below exception occurs
I have used the below code:
private void generateCrystalReport(long billNo)
{
string connStr = bll.getConnectionString();
SqlConnection sq = new SqlConnection(@connStr);
ReportDocument rprt = new ReportDocument();
rprt.Load(@"D:\DE\addArticle\addArticle\InvoiceCrystalReport.rpt");
SqlCommand cmd = new SqlCommand("InvoiceDetails", sq);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add("@BillNo", SqlDbType.BigInt).Value = billNo;
SqlDataAdapter sda = new SqlDataAdapter(cmd);
DataSet ds = new DataSet();
sda.Fill(ds, "InvoiceDetails");
rprt.SetDataSource(ds);
frm.crystalReportViewer1.ReportSource = rprt;
}
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
3
)
Next Recommended Forum
how to preview arabic in write site
How to get fastest Heading Number from Word document.