帆软(FineReport)报表学习 |
您所在的位置:网站首页 › excel图表筛选器在哪里 › 帆软(FineReport)报表学习 |
接着上面的帆软(FineReport)报表学习——插入图表,我们看一下添加一些筛选器,计划通过下拉列表更新数据。 首先拖动一个【空白块】到顶端,然后双击进入编辑模式,拖动两个下拉列表到里面,分别命名为:datayear和datamonth,拖动两个标签到里面,显示提示信息,最后布局如下: 然后我们编辑数据查询,对应的修改如下表: totaldataselect dept,sum(amount) as amount from salesdata where datayear=${datayear} and datamonth=${datamonth} group by deptmonthdataselect dept,datamonth,sum(amount) as amount from salesdata where datayear=${datayear} group by dept,datamonthshopdataselect dept,shopname,sum(amount) as amount from salesdata where datayear=${datayear} group by dept,shopname
就是在原有的查询上加入查询变量,变量的格式为${变量名},如果字段格式为字符串什么的,还要相应的加上单引号或者格式转换函数什么的包一下。 现在预览,点击顶部的下拉框,下面内容会自动刷新。
|
今日新闻 |
推荐新闻 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |