日期:2014-05-20  浏览次数:20624 次

c#应用程序,报表问题
c#应用程序,报表问题

我连接了两个表,却不能打印报表
string   sql   =   "select   *   from   bb_gbdjb   inner   join   bb_rcxxb   on   bb_gbdjb.code=bb_rcxxb.code   where   1=1 ";
                        CrystalReport11   wl   =   new   CrystalReport11();
                        DataSet   ds   =   new   DataSet();
                        SqlDataAdapter   ad   =   new   SqlDataAdapter(sql,   sqlconn.cn);
                        sqlconn.cn.Close();
                        sqlconn.cn.Open();
                        ad.Fill(ds);
                        wl.SetDataSource(ds.Tables[0]);
                        crystalReportViewer1.ReportSource   =   wl;
                        crystalReportViewer1.PrintReport();
提示错误
Crystal   Report   Windows   窗体查看器
文件   C:\DOCUME~1\zyf\LOCALS~1\Temp\temp_9341c5dc-22c6-48d3-8007-742cabb32875   {16AF5C96-3CDA-4A86-AECA-11B483062C75}.rpt   内出错:
无法连接:错误的登录参数。

------解决方案--------------------
up
------解决方案--------------------