控制控件显示隐藏
_g().getWidgetByName('report0').setVisible(false)
字符串拼接
CONCATENATE("核心市场",LEFT($endtime,4),"年",RIGHT($endtime,2),"月价格情况")
sql查询接收日期控件传参:
select
year,
month,
yearmonth,
country,
segment,
rank_no,
model,
round(volume,0) as volume,
round(ytd_volume,0) as ytd_volume,
concat(round(min_msrp_price,0),"~",round(max_msrp_price,0)) as msrp_price,
concat(round(min_tp_price,0),"~",round(max_tp_price,0)) as tp_price,
concat(round(diff_min_tpprice,0),"~",round(diff_max_tpprice,0)) as diff_tpprice,
round((diff_min_tpprice-diff_mg_price)/diff_mg_price,0) as diff_mg_price,
diff_min_tpprice,
diff_max_tpprice,
case
when diff_min_tpprice < 0 then '1'
when diff_max_tpprice > 0 then '2'
when diff_min_tpprice = 0 and diff_max_tpprice = 0 then '3'
else '0'
end price_trend,
CONCAT(country,"_",model) as link
from t_ids_coreprice
where 1=1
${if(len(endtime)=0,""," and yearmonth='"+endtime+"'")}
order by country,segment,rank_no
sql接收链接传参:
select
round(min_tp_price,0) as min_tp_price,
round(max_tp_price,0) as max_tp_price,
round((max_tp_price-min_tp_price),0) as dif_tp_price,
yearmonth
from t_industry_price_l2
where country = '${country_chart}' and model = '${model_chart}' and year = '${endtime}'
隔行变色
普通报表修改日期控件后提交:
JS实现无需点击查询按钮即可自动查询- FineReport帮助文档 - 全面的报表使用教程和学习资料
_g().parameterCommit();