Maximo

Maximo

Come for answers, stay for best practices. All we're missing is you.

 View Only
  • 1.  BIRT Hieararchy order

    Posted 06/14/21 03:49 AM
    Hi,

    Two months ago I asked for hierarchy in birt report. Now I have data in report with levels at the right and in order, like we can see at picture below.



    Any idea how to achieve that from my report:



    ------------------------------
    Blaz Rakar
    ------------------------------

    #AssetandFacilitiesManagement
    #Maximo


  • 2.  RE: BIRT Hieararchy order

    Posted 06/21/21 02:16 PM
    I do not understand the question here.  Please clarify.

    ------------------------------
    Bradley K. Downing , MBA
    IBM Certified Adv. Deployment Prof. Maximo v7.6.1
    IBM
    Bakersfield CA
    ------------------------------



  • 3.  RE: BIRT Hieararchy order

    Posted 08/31/21 09:14 AM
    Hello,

    If anybody will need this. I solved my task for asset hierarchy order with CTE query for DB2:

    ```
    WITH lochie(locnum, locpnt, locste, locname,loclcn,locposition, loclvl) AS (
    SELECT p.assetid, p.parentassetid, p.siteid, p.name, p.lcn, p.position,0 loclvl from plusasaonoff p
    where p.assetid=(select assetid from asset where assetnum='917913630138' fetch first row only) and p.offtime is null
    UNION ALL
    SELECT assetid, parentassetid, siteid, name,lcn,position, (loclvl + 1) loclvl
    FROM plusasaonoff p, lochie WHERE p.siteid = locste AND p.parentassetid = locnum and p.offtime is null
    )
    SELECT distinct a.loclcn as LCN, a.locposition as position, a.locname as position_name, p.assetnum, p.serialnum, ac.item as ASSET_PARENT_CM_ITEM, a.locnum, a.locpnt, a.loclvl as HIERARCHYLEVELS
    FROM lochie a
    LEFT JOIN asset p on p.siteid = a.locste and a.locnum = p.assetid and p.plusacatid is not null
    left join plusacacat ac on ac.plusacacatid=p.plusacatid
    order by LCN
    ```

    ------------------------------
    Blaz Rakar
    ------------------------------