Clarity

 View Only
  • 1.  Hierarchical Portlets & Exporting to Excel in v12.06

    Posted Apr 21, 2010 07:04 AM
    After doing some testing on 12.06 I noticed that the known bug (CLRT-42568) which was not exporting child data rows to excel from a hierarchical portlet was not fixed, although the 12.05 release notes stated it was.  I raised a case and CA have provided a solution, and it appears to be undocumented in the latest version of the Studio Guide, so I am sharing it here:   The grid engine will now pass down a parameter called "hg_all_rows" and when that parameter is "1", the query must return all the child rows. The query author must check for this parameter and adjust the sql statement accordingly.  In pseudo code using a simple 1 parent to 1 child table example, this means you need to write something like this  Select Dimension Key
    Select Dimension Prop
    Select Dimension Prop2...etc  From(/*Get parent data */
    Select Parent Data, null as child data, some count or flag as HG_HAS_CHILDREN
    From
    parent table, child table
    Where @WHERE:PARAM:USER_DEF:STRING:HG_ROW_ID@ IS NULL  Union/* get child data */
    Select null as parent data, child data, null as HG_HAS_CHILDREN
    Fromparent table, child table
    Where some parent column = @WHERE:PARAM:USER_DEF:string:HG_ROW_ID@ /* or use a substring */  Union /* this is the part that enable export to excel to work */Select parent data, child data, null as HG_HAS_CHILDREN
    Fromparent table, child table
    Where @where:param:user_def:integer:hg_all_rows@ = 1
    ) as X  Where/* top level filters here */
    @FILTER@  Hope this is of use.


  • 2.  Re: Hierarchical Portlets & Exporting to Excel in v12.06

    Posted Apr 27, 2010 06:46 AM
    Thanks Owen!!  Does the construct hg_all_rows work in previous version of Clarity as well? (8.1.x)?I will give it a try anyway.


  • 3.  RE: Re: Hierarchical Portlets & Exporting to Excel in v12.06

    Posted Jun 29, 2010 06:41 AM
    Hi there,

    were you able to make it work in Clarity 8.1.x? I have tried it, but it didn't work. I haven't been able to verify that it does work in 12.0.6.

    Regards,

    Ben


  • 4.  RE: Hierarchical Portlets & Exporting to Excel in v12.06

    Posted Jun 29, 2010 08:09 AM
    Hi Owen,

    Thanks for your post. Good to know that there is a way to download the entire contents of a Hierarchical Portlet.

    However, we are on 12.03 and I tried to implement the hg_all_rows in one of our portlets but failed. Is the solution applicable only for 12.05 and above?

    Also, if you have some more examples, will it be possible to share with us? Do we need to expand all the units to download or can I simply run the portlet, click Export to Excel to download Parent and Children?

    Thanks
    ~D


  • 5.  RE: Hierarchical Portlets & Exporting to Excel in v12.06

    Posted Aug 01, 2012 11:26 AM
    we are on Version/Build 12.1.1.1208 3 002 .
    Does anyone know how to export to excel only the values that appear on the grid. The hg_all_rows = 1 exports all data and not just the filtered data....any ideas?? Please let me know.
    Thanks.