1,select count(parval) as counts 这个as 出来的counts字段怎么求和,数据源DataSet1.xsd中新添加了counts列,用公式求和
  报错:此处需要一个数字字段 或 货币金额字段2,两个select查询语句都要,绑定到水晶报表该如何实现
3,水晶报表子报表绑定问题哪位大哥有水晶报表使用源码c#,b/s结构的
可以发我邮箱:[email protected]
小弟不甚感激

解决方案 »

  1.   

    你的 sql怎么写的,贴完整.
      

  2.   

    --1的SQL语句
    select createtime,parval,count(parval) as counts,(parval*count(cardno)) as sums from  ks_card_waitsell  where  status =1  group by createtime,parval order by createtime desc公式 :Sum ({ks_card_waitsell.counts})
      

  3.   

    数据源DataSet1.xsd中新添加了counts列 ,是什么类型的?
      

  4.   

    counts 
    DataType System.Int32
      

  5.   


    第一个问题暂时已经解决是我修改counts 类型后没 验证数据库谢谢 泰哥
      

  6.   

    1.水晶報表自帶統計功能 右鍵--插入--總計 選擇你要進行計算的字段就ok
    2. 對應DataSet1.xsd 里 右鍵--加入--新增element 需要多少就建多少個
    設置好對于的數據的類型即可 數據庫int 對應數據集int, tinyint對應unsignedByte 其他的和數據庫字段類型基本一樣
    3.先新建個報表 在主報表里:右鍵--插入--子報表 選擇你新建的報表即可
    注:水晶報表版本9,至于其他的版本應該大同小異吧
      

  7.   


    问题2:
    两个SQL语句,就要在Dataset1.xsd中建两个datatable,注意,如果这两个表有关联,必须设置关联关系
    da = new OleDbDataAdapter("SELECT EmployeeId1 as EmployeeId,EmployeeName1 as EmployeeName From Employee1", cn);
    da.Fill(ds1, "Employee");da = new OleDbDataAdapter("SELECT ProductId1 as ProductId,ProductName1 as ProductName From Product1", cn);
    da.Fill(ds1, "Product");问题3:对于dataset  实现的子报表,不需要任何特殊设置,只要是使用了dataset1中的datatable,使用同样的语句即可。
    da = new OleDbDataAdapter("SELECT ProductId1 as ProductId,ProductName1 as ProductName From Product1", cn);
    da.Fill(ds1, "Product");我正在做一个操作视频,稍后你可以到我的博客上看看
      

  8.   


    那能获取到下拉列表的值么?
    SelectedItem.Text
      

  9.   


    这个贴结了
    我去你blog问你