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
How can we solve crystal report "Load Report Failed Error"?
Ankit Agarwal
9y
424
1
Reply
Hello,
How can we solve crystal report "Load Report Failed Error" in wpf application?
It is running only development mode but when we installed software and then generate crystal report so it is giving error "Load Report Failed".
I am using this code for generate Crystal Report:-
public void GenerateInvoice()
{
SqlConnectionClass conString = new SqlConnectionClass();
SqlCommand cmd = new SqlCommand("procGeneratePDF", conString.GetConnection());
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add("@InvoiceNumber", SqlDbType.Int).Value = InvoiceNum;
DataSet ds = new DataSet();
SqlDataAdapter sda = new SqlDataAdapter(cmd);
sda.Fill(ds,"InvoiceRecord");
InvoiceReportDocument.Load(AppDomain.CurrentDomain.BaseDirectory + "../../InvoiceReport.rpt");
InvoiceRep.SetDataSource(ds);
InvoiceRep.SetParameterValue("CustomerName", cmbCustomer.Text);
InvoiceRep.SetParameterValue("CustomerAddress", txtCustomerAdd.Text);
InvoiceRep.SetParameterValue("CustCIty", txtCity.Text);
InvoiceRep.SetParameterValue("CustState", txtState.Text);
InvoiceRep.SetParameterValue("CustPIN", txtPin.Text);
InvoiceRep.SetParameterValue("CustCountry", txtCountry.Text);
InvoiceRep.SetParameterValue("CustInvoiceNumber", txtInvoiceNumber.Text);
InvoiceRep.SetParameterValue("ProjPORef", txtPORef.Text);
InvoiceRep.SetParameterValue("CustVendorCode", txtVendorCode.Text);
InvoiceRep.SetParameterValue("AmountInWord", txtAmountInWords.Text);
}
private
void
btnSave_Click(
object
sender, RoutedEventArgs e) { GenerateInvoice(); }
please help me.
Thanks in Advance.
Ankit Agarwal
Software Engineer
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
WPF Delete Multiple Rows using Datagrid (ViewModel)
Datagrid group header