1

私は BIRT の初心者ですが、手を使ってできることはあります。

背景:

データセンターでのレイヤー 1 接続の表示と単純なモデリングを可能にするソフトウェアを開発しています。

これは Java ベースで、Tomcat 上で実行され、BIRT レポートを使用します。BIRT は、実装した一般的な Web サービスからデータをフェッチし、BIRT が SOAP を使用してフェッチする XML としてデータを提供します。

私が現在取り組んでいるレポートでは、機器の特定のポートの回路トレースを見つけるためにシステムにクエリを実行しています。

この単純なレポートは正常に機能します。アセットへの祖先パスを提供し、次に特定のアセットとポートを提供します。

たとえば、資産 ID 49345、ポート 1 の場合、レポートは (少し) 次のようになります...

Organization >> Comms Room >> Comms Room Cabinet 02 Rack 01 >> Comms Room C02 R01 Telephone Patch Panel       P1 - B1
Organization >> Comms Room >> Comms Room Cabinet 02 Rack 01 >> Comms Room C02 R01 Patch Panel 02              P2 - B2
Organization >> Client/Server development >> U1 ClntSvr FB 02 >> U1 ClntSvr FB 02 I4                          P2 - B2

これは、電話パッチ パネルの背面が前面に、パッチ コードを介して別のパネルに、そのパネルの背面に、フロア ボックスの背面につながることを示しています。

このレポートは非​​常にうまく機能します。

1 人の顧客がもっと欲しい!

彼らは、BIT レポートからの Excel エクスポートをフィルター処理できるようにしたいと考えています。つまり、祖先パスを区切るのではなく、リスト形式でエクスポートする必要があるため、Excel にエクスポートすると、各エントリが別の列に表示されます。

単一の文字列ではなく祖先要素の配列を返すようにクエリを変更しましたが、独自の方法でこれも機能します。

この新しいクエリに対する SOAP 応答は以下のとおりです (情報として - 役立つ場合があります)。

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
   <SOAP-ENV:Header/>
   <SOAP-ENV:Body>
      <FindCircuitByAssetAndPortResponse>
         <CircuitDetail>
            <FoundByAsset>Comms Room C02 R01 Telephone Patch Panel (id: 49345)</FoundByAsset>
            <FoundByPort>P1</FoundByPort>
            <CircuitAssetDetail>
               <AssetId>49345</AssetId>
               <AncestryPath>Organization >> Comms Room >> Comms Room Cabinet 02 Rack 01 >> Comms Room C02 R01 Telephone Patch Panel</AncestryPath>
               <AncestryPathList>
                  <AncestryPathElement>Organization</AncestryPathElement>
                  <AncestryPathElement>Comms Room</AncestryPathElement>
                  <AncestryPathElement>Comms Room Cabinet 02 Rack 01</AncestryPathElement>
                  <AncestryPathElement>Comms Room C02 R01 Telephone Patch Panel</AncestryPathElement>
               </AncestryPathList>
               <AssetTypeName>Patch Panel</AssetTypeName>
               <InPort>B1</InPort>
               <OutPort>P1</OutPort>
            </CircuitAssetDetail>
            <CircuitAssetDetail>
               <AssetId>49339</AssetId>
               <AncestryPath>Organization >> Comms Room >> Comms Room Cabinet 02 Rack 01 >> Comms Room C02 R01 Patch Panel 02</AncestryPath>
               <AncestryPathList>
                  <AncestryPathElement>Organization</AncestryPathElement>
                  <AncestryPathElement>Comms Room</AncestryPathElement>
                  <AncestryPathElement>Comms Room Cabinet 02 Rack 01</AncestryPathElement>
                  <AncestryPathElement>Comms Room C02 R01 Patch Panel 02</AncestryPathElement>
               </AncestryPathList>
               <AssetTypeName>Patch Panel</AssetTypeName>
               <InPort>P2</InPort>
               <OutPort>B2</OutPort>
            </CircuitAssetDetail>
            <CircuitAssetDetail>
               <AssetId>48634</AssetId>
               <AncestryPath>Organization >>  Client/Server development >> U1 ClntSvr FB 02 >> U1 ClntSvr FB 02 I4</AncestryPath>
               <AncestryPathList>
                  <AncestryPathElement>Organization</AncestryPathElement>
                  <AncestryPathElement>Client/Server development</AncestryPathElement>
                  <AncestryPathElement>U1 ClntSvr FB 02</AncestryPathElement>
                  <AncestryPathElement>U1 ClntSvr FB 02 I4</AncestryPathElement>
               </AncestryPathList>
               <AssetTypeName>Module</AssetTypeName>
               <InPort>P2</InPort>
               <OutPort>B2</OutPort>
            </CircuitAssetDetail>
         </CircuitDetail>
      </FindCircuitByAssetAndPortResponse>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

レポート データ セットは、最も深いレイヤー、つまり祖先要素を使用します。

ただし、データを表示すると、重複したデータがあります。たとえば、上記のデータは次のように表示されます...

Organization                             B1 - P1
Comms Room                               B1 - P1
Comms Room Cabinet 02 Rack 01            B1 - P1
Comms Room C02 R01 Telephone Patch Panel B1 - P1
Organization                             P2 - B2
Comms Room                               P2 - B2
Comms Room Cabinet 02 Rack 01            P2 - B2
Comms Room C02 R01 Patch Panel 02        P2 - B2
Organization                             P2 - B2
Client/Server development                P2 - B2
U1 ClntSvr FB 02                         P2 - B2
U1 ClntSvr FB 02 I4                      P2 - B2

XML 経由で 12 の「行」を取得しているという点で、これは「正しい」です。列マッピングは、要素が「現在の」データであり、ポート (P1 & B1) が 1 レベル「上」にあることを示しています。

祖先パス リストに関するデータをフェッチすると、重複したデータは取得されませんが、この時点では、祖先パス リストはリストとして表示されないため、何も表示されないか、最初の要素だけが表示されます。リストから繰り返し、結果として...

Organization B1 - P1
Organization
Organization
Organization
Organization P2 - B2
Organization
Organization
Organization
Organization P2 - B2
Organization
Organization
Organization

BIRT は私が必要とすることを 99% 確実に実行してくれると確信していますが、私は BIRT に慣れていないので、これまでのところ十分に機能していることに驚いています。

リストのリストを取得する必要がある他の状況があるため、この問題は特定のものではありません。

これがすでにカバーされている場合は、お詫び申し上げます。見ましたが、よくわからない用語にリストされている可能性があります。

どうもありがとう。

ピート。

4

1 に答える 1