ReportDataSource 值不在预期的范围内

ReportDataSource reportDataSource = new ReportDataSource("queryStat_wjwj", SqlHelper.ExecuteDataset(sql.ToString()));

出现错误 “值不在预期的范围内”

注意 第2个参数 SqlHelper.ExecuteDataset(sql.ToString()) 返回的 dataset

改成 SqlHelper.ExecuteDataset(sql.ToString()).Tables[0] 返回的 Table 即可

 

http://blog.csdn.net/codetian/archive/2009/06/23/4292383.aspx

posted @ 2009-10-31 12:21  emanlee  阅读(1585)  评论(0编辑  收藏  举报