Sunday, February 24, 2013

How to make crosstab report from left/ right to up/down positions, or from parent child to flattened hierarchy

Customer may request different crosstab format from Cognos standard format, one of most used layout is to make parent and child node members from left/right to up/down to save space on width, which makes report looks much cleaner. This document demonstrates three different cases; please download the report specification with version 10.1.1 for review if needed.


Simple parent child

Please see report below


Steps to deign this report

  1. Create a standard simple parent child crosstab


  1. Copy product line to the right side and make font bold


  1. Add cross space above product line


  1. Add cross space after the first added space


  1. Unlock cell, add Title, then highlight fact cell and set define content as “Yes”, and then drag Year to fact cell, highlight all title row as yellow



  1. Select old title and product line node and make box type as “NONE”



Node member with measures


Please see report below





Steps to deign this report

  1. Create a standard simple parent child crosstab


  1. Copy product line to the right side and make font bold


  1. Make cross section define contents “Yes”, and drag Year to overwrite to fact cell


  1. Highlight Product line and year


  1. Select old title and product line node and make box type as “NONE”




Flattened hierarchy


Please see report below

Steps to deign this report

  1. Create a standard simple parent child crosstab


  1. Copy product line above Product Type, and copy Product type above Product


  1. Add cross space after Product Line to make product Line, product type and Product become flattened


  1. Format Product line, product type and product as below



  1. Add cross space above product line , Add two cross space after the first added space, Unlock cell, add Title, then highlight fact cell and set define content as “Yes”, and then drag Year to fact cell, highlight all title row as yellow


  1. Select old title, product line node etc as marked and make box type as “NONE”


Note



  1. The solution is also appliable for Cube and DMR. In case when a node is a set, you can use CurrentMember function to get same functionality with drill up and down.d title, product line node etc ast m

1 comment:

  1. Hi Charles,
    Your post really helpful for me.Thanks a lot and Keep doing.

    ReplyDelete