المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Load report fail



C# Programming
03-08-2011, 06:51 AM
hello
i face a error when i view report, some time this code is working fine bt some time give me error "LOAD REPORT FAIL"
i use blow code please check my code and give me suggestion,

private void BtnGenrate_Click(object sender, EventArgs e)
{
NomanInternational.Reports.PartyStatementRpt psrpt = new NomanInternational.Reports.PartyStatementRpt();
DateTime start = Convert.ToDateTime(txtdateto.Text);
DateTime end = Convert.ToDateTime(txtdatefrom.Text);
crystalReportViewer1.ReportSource = psrpt;
crystalReportViewer1.SelectionFormula = "{OB.heads}='" + Heads.Text + "' and {Recive.trans_date}>=#" + start.ToShortDateString() + "# and {Recive.trans_date}