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

Can we display data conditionally?

Started by Steve, 13 Mar 2007 04:01:59 PM

Previous topic - Next topic

Steve

The purpose is to display data when that data is available otherwise display 'Not available'.
Ex: Product column is blank in the database so the cube does not get the data. In that case, we want to display 'Not available'.

It's like having a variable where we define the condition 'If .... then ..<data> else 'Not Available'.

Can we achieve this in Report Studio. I might be just missing the expression.

Thanks for your help,
Steve

almeids

Yes, you can, but Reportnet is touchy about where you put things.  The conditionally formatted text needs to be in a footer (list or overall, I'm not sure if both work), and the conditional variable needs to be based on a count - I don't recall where it likes the counter, you may have to experiment with it in your tabular model versus at the query level (and the count function versus a count aggregation).  Sorry about the uncertainty, I played with it once or twice in the past but we don't use it anywhere in production.  I just tried to get it working for a few minutes with no success, but I do know it's possible
HTH,
Steve

ajax6262

If you are truly referring to an example where there is an empty space in the row of data, I would think you could just change the expression for that data item to this:

IF (<data> = NULL)
THEN ('Not Available')
ELSE (<data>)


Or this:

CASE <data>
WHEN NULL THEN 'Not Available'
ELSE <data>
END

Otherwise if you are referring to an example where there is not even a row of data for a particual product, your solution would be a bit more complicated. The best way would be to make sure that the tables are joined with an outer join in framework manager.  I'm guessing there is a way around that with tabular sets if messing with framework manager isn't an option, but I'm pretty inexperienced with tabular sets.

almeids

Steve - found the details to solodifiy my previous reply: text must go in list footer, conditional variable should be calculated as "count(any-data-item)>0", and format your text box type to None when the condition is Yes...
Steve

almeids

that's "solidify" - sorry, forum dyslexia, can't read anything properly until after I hit "Post" button