Topic
  • 3 replies
  • Latest Post - ‏2013-10-02T23:52:29Z by OpherB
RaghuGanta
RaghuGanta
2 Posts

Pinned topic Parsing Parent Child in report

‏2013-10-02T23:07:35Z |

I have a report based on relational data where i need to parse parent/child relatation ship and determine if the row need to display in report or not

can someone please advise me how to create the report in reportstudio

criteria for display of row in report is :   If parent's family ="Y" then Hide Child records

 

No          Child_ID               PARENT_ID         family    Display in report flag

1              1307                       1308                       Y              Yes

2              1308                       1995                       N             Yes

3              96                           1308                       Y              Yes

4              628                         1307                       Y              No

5              629                         1307                       Y              No

6              1995                       0                              N             No

below is explation of why particular row is displayed in report or not

Row 1 :Parent of 1307 is 1308, since 1308 (row2) family is "N' then display in report

Row 2: Parent of 1308 is 1995 since 1995 (row 6) family is "N' then display in report

row 3: Parent of 96 is 1308 since 1308 (row 2) family is "N' then display in report

row 4: parent of 628 is 1307 since 1307 (row1) family is "Y' DO NOT display in report

row 5: parent of 629 is 1307 since 1307 (row1) family is "Y' DO NOT display in report

 

 

Updated on 2013-10-02T23:09:19Z at 2013-10-02T23:09:19Z by RaghuGanta
  • OpherB
    OpherB
    664 Posts

    Re: Parsing Parent Child in report

    ‏2013-10-02T23:42:09Z  

    In Framework Manager, alias this table and join to itself where table.child_id = alias.parent_id

    Then in Report Studio, lay out the report page and put conditional formatting on the rows where alias.parent_id.family='Y' to hide rows.

    Good luck.

    Opher

     

  • RaghuGanta
    RaghuGanta
    2 Posts

    Re: Parsing Parent Child in report

    ‏2013-10-02T23:50:40Z  
    • OpherB
    • ‏2013-10-02T23:42:09Z

    In Framework Manager, alias this table and join to itself where table.child_id = alias.parent_id

    Then in Report Studio, lay out the report page and put conditional formatting on the rows where alias.parent_id.family='Y' to hide rows.

    Good luck.

    Opher

     

    Thanks Opher for quick reply. That is really good approch however there could be parent child nesting upto 5 levels(max)

    do u think this approch still holds good with nested parent child hierarchy

  • OpherB
    OpherB
    664 Posts

    Re: Parsing Parent Child in report

    ‏2013-10-02T23:52:29Z  

    Thanks Opher for quick reply. That is really good approch however there could be parent child nesting upto 5 levels(max)

    do u think this approch still holds good with nested parent child hierarchy

    NO!

    Parent-child is not five levels - it's TWO.

    Whoever designed a self-referencing table five levels deep was not using (or did not know) SQL.

    You will need to denormalize all the relations into a flat table. That will take time, but the results will be much faster for reporting.

    Good luck,
    Opher

     

    Updated on 2013-10-02T23:54:52Z at 2013-10-02T23:54:52Z by OpherB