js里面可以调用sql吗
var sql = "sql(\"ZZMA\",\"select count(*) from tdepart_government_sj where depart_no='"+depart_no+"' and cyear='"+cyear+"' and cmonth='"+cmonth+"'\",1,1)"; FR.remoteEvaluate(sql);
仿照这个写吧,直接定义,调用帆软内置方法运行就可以
在JS代码中使用FineReport内置的公式-https://help.finereport.com/doc-view-1785.html
SQL函数-https://help.finereport.com/doc-view-846.html
这两个组合起来就是了。
FR.remoteEvaluate() 可以调用帆软的公式
而帆软的公式有sql()函数,一起用就行了,
另外要关掉脚本调用公式限制(因为js调用sql不安全);