If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Prompt for DMR hierarchy levels

Started by Sharptooth, 12 Oct 2016 12:20:32 PM

Previous topic - Next topic

Sharptooth

I've been trying to implement something all morning with no luck.  Maybe someone on here's done something similar?

In Cognos 10 report studio/crosstab, I'm using an FM DMR model that has a dimension with 5 levels, like this:

DimensionXYZ
  LevelA
  LevelB
  LevelC
  LevelD
  LevelE

Traversing the hierarchy up/down the levels is fine.   Now what I'd like to do is add a prompt to allow the end user to select 1 level then auto submit to  jump to the selected level.   So instead of starting at LevelA & having to drill down 4 times to reach LevelE, the end user just selects LevelE from the prompt.

I had been playing around with roleValue & '_levelUniqueName' which looked promising but I kept hitting a wall.

Any suggestions?    Thanks in advance!!

Lynn

Have you played around with token in a prompt macro? The "use" value for each option in your prompt control will be the expression that represents the level within the dimension and the data item in your report layout will be a prompt macro of type token.

A token prompt just passes the value straight through for processing so it is a way to achieve dynamic content.

I don't have time to try out an example to give specific syntax but maybe you can research the concept a bit further or perhaps others will chime in.

Sharptooth

Lynn - I've not checked out the token concept, though I have seen it referenced.  I'll spend some time on that & if successful will post the how-to results on here.   Thanks for the reply.

In the meantime, I'm still open for others input.   :)


Lynn

Ok, found some time today to put a quick sample together from the GO Sales (analysis) package. Spec is attached.

The "use" value for each item in the prompt is the level as found in the properties if you right-click the level within the meta data tree.

For example:
[Sales (analysis)].[Products].[Products].[Product line]

The parameter name associated with the prompt control is 'Select Level'

The expression in query calculation on the rows is:
#prompt ( 'Select Level', 'token', '[Sales (analysis)].[Products].[Products].[Product line]' )#

The first argument is the parameter name. Second is the type. Third is the default value. Note that I also set the default value on the prompt control.

What you get should be all the members you find in the members folder in the meta data tree for whatever level is chosen.

Hope this helps or puts you on the right track!

Sharptooth

Lynn - After some additional research/testing & reviewing your example, I'll need to change direction a little to get what I ultimately need for the end user.  But your example definitely bumped me in the right direction.

Appreciate your time!