我的代码如下:
string sql1 = "SELECT CustomerName,SumMark,ChargeMoney FROM TblUserGas left join tblClient on TblUserGas.customerId=tblClient.Customerid where complete=0 " + sqlhou + " ORDER BY ChargeDate DESC";
DataSet ds = new DataSet();
SqlDataAdapter mycommand = new SqlDataAdapter(sql1, SqlConn);
mycommand.Fill(ds, "TblUserGas");
mycommand.Fill(ds, "tblClient");
jjtrq.Report.Gasqian yongqituReport = new jjtrq.Report.Gasqian();
yongqituReport.SetDataSource(ds.Tables["TblUserGas"].DefaultView);
yongqituReport.SetDataSource(ds.Tables["tblClient"].DefaultView);
crystalReportViewer1.ReportSource = yongqituReport;
SqlConn.Close();显示结果如下:
CustomerName这个字段就是显示不出来,怎么回事呢?
string sql1 = "SELECT CustomerName,SumMark,ChargeMoney FROM TblUserGas left join tblClient on TblUserGas.customerId=tblClient.Customerid where complete=0 " + sqlhou + " ORDER BY ChargeDate DESC";
DataSet ds = new DataSet();
SqlDataAdapter mycommand = new SqlDataAdapter(sql1, SqlConn);
mycommand.Fill(ds, "TblUserGas");
mycommand.Fill(ds, "tblClient");
jjtrq.Report.Gasqian yongqituReport = new jjtrq.Report.Gasqian();
yongqituReport.SetDataSource(ds.Tables["TblUserGas"].DefaultView);
yongqituReport.SetDataSource(ds.Tables["tblClient"].DefaultView);
crystalReportViewer1.ReportSource = yongqituReport;
SqlConn.Close();显示结果如下:
CustomerName这个字段就是显示不出来,怎么回事呢?
解决方案 »
- 项目中大数据量插入,您是如何做的。
- 求一简单正则 16:00-16:25 匹配。
- 郁闷~透明图片放置在控件上 无法透明 100分
- 谁有AnalyzerNet分词组件或者pudn帐号?
- C#与cell组件融合
- vs2003如何序列化/反序列化时如何序列化arraylist属性?
- 如何在Form没有打开之前,通过Timer定时5秒内判断按下Shift键没有?
- 请问各位大虾MSDN英文版有没有办法转换成中文版?
- 有没有人知道如何将EXCEL表格数据库写入SQL SERVER数据库?
- Entity Framework 映射的SQL数据库,求一个高效的写入方法
- 关于WINFORM中用推方法做水晶报表两表连接问题
- 关于wmi中枚举出电脑所有硬件
ds.Tables["TblUserGas"]里的表数据不和ds.Tables["tblClient"]一样吗?
都是通过mycommand 来填充的!