按序列順序過濾 Birt 表 (Filter in serial order for Birt tables)


問題描述

按序列順序過濾 Birt 表 (Filter in serial order for Birt tables)

我在 Birt 報告中有一個表格,我想在其中顯示客戶流程的後 10 個處理時間。一個簡單的“底部 n”過濾器非常有效 ‑ 但我的客戶來了。他說他想要我創建的倒數 10 個表,但沒有不一致的值,這些值是由單個進程產生的,每月只運行一次。

因此該表應該顯示倒數 10 個處理時間,但是它應該只包含特定進程的進程,例如一個月內運行進程的 0.01% 以上。

我嘗試了一個額外的過濾器,它只顯示運行頻率超過 0.01% 的進程總流程 ‑ 但現在我的結果表是空的。

是否有可能實現 Birt 過濾器優先 所有處理的進程少於進程總數的 0.01 %,之後構建預過濾結果集的後 10 個列表?我無法更改 SQL 數據集,因為它也在其他一些表中使用。

這是我的過濾器,如果我只應用其中一個,它們可以正常工作 ‑ 兩者一起我收到一個空結果集。

<list‑property name="filter">
  <structure>
    <property name="operator">ge</property>
    <expression name="expr" type="javascript">row["TOTAL"]/row["Ov_TOTAL"]</expression>
    <simple‑property‑list name="value1">
      <value>0,01</value>
    </simple‑property‑list>
    <property name="updateAggregation">true</property>
  </structure>
  <structure>
    <property name="operator">bottom‑n</property>
    <expression name="expr" type="javascript">row["AVG_DURATION"]</expression>
    <simple‑property‑list name="value1">
      <value>10</value>
    </simple‑property‑list>
    <property name="updateAggregation">true</property>
  </structure>
</list‑property>

參考解法

方法 1:

I gave it a try and it works for me. The only difference with your example is, in my case the ratio is already computed when the filter is applied: see "shareVolume" column below.

<list‑property name="filter">
    <structure>
        <property name="operator">ge</property>
        <expression name="expr" type="javascript">row["shareVolume"]</expression>
        <simple‑property‑list name="value1">
            <value>0.01</value>
        </simple‑property‑list>
        <property name="updateAggregation">true</property>
    </structure>
    <structure>
        <property name="operator">bottom‑n</property>
        <expression name="expr" type="javascript">row["value2"]</expression>
        <simple‑property‑list name="value1">
            <value>3</value>
        </simple‑property‑list>
        <property name="updateAggregation">true</property>
    </structure>
</list‑property>

To achieve this i computed the ratio in the dataset. I just added two computed columns: the SQL is unchanged and other existing report components using the same dataset still perfectly work.

enter image description here

(by twobeersDominique)

參考文件

  1. Filter in serial order for Birt tables (CC BY‑SA 2.5/3.0/4.0)

#filtering #birt






相關問題

禁止查找和 grep“無法打開”輸出 (Suppress find & grep "cannot open" output)

directx10 中的精靈和紋理過濾 (Sprites in directx10 and texture filtering)

使用 Lucene 統計分類結果 (Using Lucene to count results in categories)

根據 URL 變量過濾 HTML 內容 (Filtering HTML content based on URL Variable)

網格列包含 int64 值,但過濾器顯示字符串並且不起作用/ (Grid column contains int64 values but filter shows strings and doesn't work/)

angularjs中的雙重過濾 (dual filtering in angularjs)

按序列順序過濾 Birt 表 (Filter in serial order for Birt tables)

日期的 Drupal 8 上下文過濾器 (Drupal 8 contextual filter for date)

在VB中過濾一個wpf collectionviewsource? (Filter a wpf collectionviewsource in VB?)

遍歷對象並返回匹配的鍵/值 (Traverse object and return matching key / values)

過濾Python列表時出現意外輸出:我做錯了什麼? (Unexpected output when filtering Python list: What am I doing wrong?)

角度:錯誤 RangeError:超出最大調用堆棧大小 (ANGULAR: ERROR RangeError: Maximum call stack size exceeded)







留言討論