在水晶报表中已经写好了sql,但是需要在sql中加上条件(条件不能写死),如何实现,是用水晶报表中的帮助中的例子没有起到作用。

解决方案 »

  1.   

    我想实现如下功能,谁能帮忙?
    例:
    Table: ss(
    last_name varchar2(20),
    age number(8))在一个REPORT里面加入两个这样的语句:
    Select count(*) from ss where last_name='aa' and
    age >?? and age <=??Select count(*) from ss where last_name='bb' and
    age >?? and age <=???? 代表参数这样把SQL 语句存入报表文件里面,调用的时候只传入两个AGE 参数就可以了,报表结果只现实Count的结果,该怎么实现????
    (现在解决不了的是如何把 and age >?? and age <=?? 存入报表文件,这样在程序中调用的时候只需要 parabyname('??')=12 这样调用就可以使用了,如何做???????????????)