我正在使用C#处理Windows窗体应用程序,当我想在Crystal Report上打印Salary Slip时。它显示"请等待文档正在处理"对话框及其继续处理并挂起我的应用程序。其余所有Crystal Reports Working Fine接受此单一报告。 请指导我什么是问题
这是我的代码
string qry = @"SELECT (Select emp_name from employ_tbl where emp_id=SM.emp_id) AS emp_id,Salary,Adv_deduction,Mdcn_deduction,Loan_deduction,Oth_deduction,Total_Absents,'' AS AbsentAmount,SM.Current_Salary,(select sum(amount) from salarybonus where bonusMounth='"
+ month + @"' AND emp_id=SM.emp_id AND name IS NOT NULL ) AS b_amount FROM SalaryManagement_tbl SM WHERE SM.Month='" + month + "' AND SM.emp_id=6";
string connection = cm.constring();
SqlConnection con = new SqlConnection(connection);
ReportDocument cryRpt = new ReportDocument();
DataTable ds = new DataTable();
con.Open();
SqlDataAdapter adp = new SqlDataAdapter(qry, con);
adp.Fill(ds);
con.Close();
cryRpt.Load(@"fullpath\PaySlip.rpt");
cryRpt.SetDataSource(ds);
crystalReportViewer1.ReportSource = cryRpt;