SQL语句在本地执行没问题,在水晶报表中就有问题了老是提示 SQL表达式有错误,仍要保它吗?我的sql语句select count(cardtype) as count from  ks_card_waitsell  where  status =1  group by cardtype,createtime
公式用法也需要求助
如果哪位大哥有例子给我发一个也行 要c#,web的例子邮箱:[email protected]

解决方案 »

  1.   

    select count(cardtype) as count from  ks_card_waitsell  where  status ='1'  group by cardtype,createtime
      

  2.   


    select count(cardtype) as count from  ks_card_waitsell  where  status =1  group by cardtype,createtime 
    --修改为select count(cardtype) as [count] from  ks_card_waitsell  where  status =1  group by cardtype,createtime 
    你的count字段为sql关键字
      

  3.   

    或者干脆将count 换为counts
      

  4.   

    select count(cardtype) as [count] from  ks_card_waitsell  where  status =1  group by cardtype,createtime --修改完的还是有错select count(cardtype) as [count] from  ks_card_waitsell  where  status ='1'  group by cardtype,createtime --也有错
    我是informix数据库
      

  5.   

    把sql语句查询的数据放在dataset中就可以,报表中只需要配置数据库字段就可以了啊
      

  6.   

    SQl 语法没错..很有可能是水晶报表用法不对..水晶报表什么错误提示,发出来看下
      

  7.   

    【SQL表达式字段】是SQL语句的一部分,但不能是一个完整的SQL语句请参考
    http://www.cnblogs.com/babyt/archive/2008/11/09/1329991.html