【问题标题】:birt reports JavaScript conditional expressionbirt 报告 JavaScript 条件表达式
【发布时间】:2014-12-15 19:47:41
【问题描述】:

我正在尝试正确编写一个公式脚本,请有人帮助我。我正在使用Birt 3.7.1。谢谢。这是一个Maximo报告

if(row["special"] == 'W' && row["metername"] == null){
false} *** I need this coded --don't hide --> must have a task ***

else{

true}



if(row["special"] == 'W' && row["metername"] != null){

false} *** I need this coded --don't hide --> must have task --> view ***

else if(row["special"] == 'W' true

else true}

【问题讨论】:

  • 您应该编辑根本不清楚的问题:“我需要这个编码->必须有任务”是什么意思?
  • 嗨,多米尼克,我相信。我试图了解如何在同一个 if 语句中添加多个条件,然后再转到 else。

标签: javascript birt maximo


【解决方案1】:

我不完全确定您在这里问的是什么,但如果您只是想在此处获得有效格式的代码,那么您可以这样做:

if (row["special"] == 'W' && row["metername"] == null) {
    return false;
} else {
    return true;
}



if (row["special"] == 'W' && row["metername"] != null) {
    return false;
} else if (row["special"] == 'W') {
    return true;
} else {
    return true;
}

我不确定它是最实用的代码,但你去吧。

【讨论】:

  • 谢谢 Aweary,但我需要我有星号编码的脚本部分。试图看看如何做一个必须的条件。
猜你喜欢
  • 1970-01-01
  • 2015-06-27
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2015-10-29
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多