Birt报告同一字段的多个参数 [英] Birt Report Multiple Parameters for the same field

查看:157
本文介绍了Birt报告同一字段的多个参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Birt生成报告。我想在我的where子句中使用相同的参数两次其中date_column> =?和date_column< ?这行上的'?'是指向日期的一个参数(报告参数)。在我的下一个where子句中添加此项,我想使用第二个参数来再次查找日期时间,但是在不同的年份(当前的年份-1)。我知道birt看到参数?顺序。如何配置?

解决方案

只需在查询中添加两个不同名称的两个参数,并使用相同的来源(Report-Paramter)参数。没有限制,您无法多次添加相同的参数到您的查询。



添加多个在您的SQL查询中,您需要参数:



的SQL查询



在参数标签中,您可以根据需要将它们链接到报表输入参数,并添加两次输入参数。您的查询中的将以您的参数顺序替换参数的值(第一个 = first参数,第二个 =第二个参数等):




I am using Birt to generate reports. I want to use the same parameter twice in my where clause e.g. where date_column >= ? and date_column < ?. The '?' at this line is one parameter which points to a date (Report parameter). Adding to this in my next where clause I want to use a second parameter to find the date period again but in a different year (current year -1). I know that birt sees parameters and ? sequentially. How can I configure this?

解决方案

Simply add two parameters with 2 diffenrent names to your query and use the same source(Report-Paramter) for both of your parameters. There is no restriction, that you cannot add the same paramter multiple times to your query.

Add as many ? in your SQL query as you need parameters:

In the Parameters Tag you can link them to your Report-Input-Parameters as you like and also add a Input-Parameter twice. The ? in your query will be replaces by the values of your parameters in the order of appereance (first ? = first parameter, second ? = second parameter etc.):

这篇关于Birt报告同一字段的多个参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆