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

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

问题描述

我正在使用 Birt 生成报告.我想在我的 where 子句中使用相同的参数两次,例如日期列 >= 在哪里?和日期列

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?

推荐答案

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

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.

在您的 SQL 查询中添加尽可能多的 ? 参数:

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 Report 同一字段的多个参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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