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

Help with Static Choice / String Variable

Started by bbrooksux, 08 Dec 2009 04:20:51 PM

Previous topic - Next topic

bbrooksux

OK, I've got this nasty bucket report where each bucket would show a count of if some items remained in a queue from a start time until getdate().  The catch is we're basing this output on a prompt supplied by the user which would let them select if they want to see this output based on the number of Days, Hours, Minutes or Seconds between those 2 times.

My thought was to create a static choice for the value prompt where the Use Value would be dd and the Display Value would be Days, etc.  And then I'd build a String Variable called Time Variable (with dd, hh, mi, ss) which would supply the actual variable values to this prompt.  I think the one piece of the puzzle that is still eluding me is the report expression to the Time Variable, because something doesn't appear to be functioning correctly.

Here's the expression definition for one of the "buckets" in the report itself.  You'll see that the 'Time Variable' is used in a macro type prompt situation so that it determines based on the user input whether to calculate the datediff using 'dd', 'hh', 'mi' or 'ss' or the default would be 'dd'.  At least that's what my hope is:

total (IF ( datediff({#prompt('Time Variable','token','dd')#},[Workflow Star Schema].[Workflow Fact].[Queue Start Time], getdate()) < ?Aging Period 1? ) THEN
    ( 1 )
ELSE
    ( 0 ))

So, what am I doing wrong here?