BIRT报告工具 [英] BIRT Report Tool
问题描述
在该报告中,对于单行,它有相应的一列的多个值(我使用LISTAGG()oracle函数映射)。
ie)结果列在下面的数据库表输出中有多个值:
否名称结果标记
---- -------------------------------
1 John X 32
XX
XXX
2 Joe X 56
XX
XX
XXX
3安德鲁34
XXX
XX
XXXX
...
它同时具有NULL和NOT NULL值在其中。
如果NULL值在中间意味着在报告中正确显示结果
示例结果获取Joe的报表输出(.pdf表单)
否名称结果标记
-----------------------------------
2 Joe X 56
XX
XX
XXX
这里的问题是,
如果第一个记录有一个NULL意味着它在报表中没有正确显示,而不是那个NOT NULL值将打印在前面等等...
示例结果收到Andrew的报表输出(.pdf表单)
否名称结果标记
-----------------------------------
3 Andrew XXX 34
XX
XXXX
但是我们前面有两个NULL值的结果列(正如您看到上面的示例oracle表输出)...
有什么选项可以在第一行显示空白(如果它是一个null)for birt报告工具中的特定行?
亲爱的Hel我解决这个问题...谢谢!
虽然我没有试图明白你的问题是什么,一般来说当数据中的空值导致BIRT报告出现问题时。使用这两个解决方案之一。
-
使用数据库函数将NULL转换为其他内容。在SQL中,我使用命令 ISNULL
-
使用BIRT数据集中的计算列创建一个新列,在JS中写入所需的任何内容。在下面的示例中,与输入参数相比,我需要对有时为空的日期字段做出决定。
if(row [START_TIME] == null){
li>
F
} else if(row [END_TIME] = = null){
T
} else if(row [START_TIME]。getTime()> = params [WeekOf]。getTime()){
T
} else if(row [END_TIME]。getTime()< = params [WeekOf]。getTime()){
F
} else if(row [ END_TIME] getTime()> = params [WeekOf]。getTime()){
T
} else {
F}
I created a Report using BIRT Report Design in Eclipse Java EE IDE(Juno Release). In that Report, For the single row it have multiple values for the corresponding one column(I used LISTAGG() oracle function to map that).
(i.e.) Result column have multiple values in the below database table output :
No Name Result Mark
-----------------------------------
1 John X 32
XX
XXX
2 Joe X 56
XX
XX
XXX
3 Andrew 34
XXX
XX
XXXX
… It have both NULL and NOT NULL values in it.
"If the NULL values are in the middle means its showing the results properly in the Report"
Sample Result am getting in Report output for Joe (.pdf form)
No Name Result Mark
-----------------------------------
2 Joe X 56
XX
XX
XXX
Here the problem is, "If First record has a NULL means it is not showing properly in the Report, instead of that NOT NULL value will print in the front and so on…"
Sample Result am getting in Report output for Andrew (.pdf form)
No Name Result Mark
-----------------------------------
3 Andrew XXX 34
XX
XXXX
But we have TWO NULL values present in the Front of Result column for Andrew (As you see sample oracle table output above)…
Is there any option to show blank in the first row(if it is a null) for the particular row in the birt report tool ?
Kindly Help me to Solve this issue… Thank you!
While I did not try to understand exactly what your issue is, in general when null values in the data are causing problems with a BIRT report. Use one of these two solutions.
Use the data base function to convert the NULL to something else. In SQL I use the command ISNULL
Use a computed column in the BIRT 'Data Set' to create a new column, write whatever you need in JS. In the example below I need to make a decision on a date field that is sometimes null, in comparison to an input parameter.
if (row["START_TIME"] == null){ "F" } else if (row["END_TIME"] == null){ "T" }else if (row["START_TIME"].getTime() >= params["WeekOf"].getTime() ){ "T" }else if(row["END_TIME"].getTime() <= params["WeekOf"].getTime() ){ "F" }else if(row["END_TIME"].getTime() >= params["WeekOf"].getTime() ){ "T" }else{ "F"}
这篇关于BIRT报告工具的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!