COGNOiSe.com - The IBM Cognos Community

Legacy Business Intelligence => COGNOS ReportNet => Report Studio => Topic started by: cognoid1 on 17 Feb 2006 01:51:19 PM

Title: Conditional Block
Post by: cognoid1 on 17 Feb 2006 01:51:19 PM
I want to display "No Data Available" when the query doesn't return any rows and display a crosstab with result if there is data returned from the query.

At the moment, I get a "blank" crosstab if there is no data and it is not intuitive enough for our end users.Ã,  I know conditional Block would solve this problem, but how do I detect no data return?

If (data is not null)
   display CROSSTAB
else
   display ("No data available")


Please advise.

Thank you.
Title: Re: Conditional Block
Post by: Draoued on 20 Feb 2006 05:35:18 AM
have a look to the following : http://www.tek-tips.com/viewthread.cfm?qid=1024852
Title: Re: Conditional Block
Post by: addpremkumar on 20 Feb 2006 07:27:17 AM
Hi,

Try with this one...

if(running_total=0)

then Dispaly( ' No data Return ' )

else Display Cross Tab

U can do this by using Conditional Block..

Hope It Will work...

Title: Re: Conditional Block
Post by: mrcool on 21 Feb 2006 11:34:55 PM
Hi,

     Try with this..create a conditional variable with rownumber()>0

If true then show the cross tab else Hide..


Thanks,
S

Title: Re: Conditional Block
Post by: gfordham on 24 Feb 2006 11:06:03 AM
Cognos has a flash movie on this in their knowledge base.
---
The Use of Conditional Blocks in Cognos ReportNet
A 3 to 5 minute Flash movie, demonstrating how the use of conditional blocks in Cognos ReportNet
Library: Knowledge Base - Multimedia
http://support.cognos.com/supported/en/support/rmkb/reportnet/1.1/report_studio/design_condition_blocks.html
---

In this example they use a parameter, for the expression in the variable, which is populated from a prompt. I still haven't found an example that uses a query item for the expression in the variable, well an example that works anyway.
--G
Title: Re: Conditional Block
Post by: zenith on 27 Feb 2006 05:20:20 AM
HI JUST DO THIS

TAKE A CALCULATION COLUMN AND PUT 1 IN IT JUST THE NUMBER 1 AND NAME IT AS CONDITION
THEN GOTO VARIABLES SECTION AND WRITE CONDITION = 1
USE A BOOLEAN VARIABLE.
THEN CLICK ON LIST FOOTER CHECK BOX AND INSERT A TEXT BOX IN THERE
AFTER ACCESING THE VARIABLES SECTION AGAIN TO DISPLAY NO DATA JUST SELECT HIDE BOX PROPERTY

HOPE IT SOLVES YOUR PROBLEM
Title: Re: Conditional Block
Post by: bdybldr on 22 May 2006 10:37:43 AM
Cognoid,
Will you give us an update on this?  Has the issue been resolved.  If so, How did you do it?
Title: Re: Conditional Block
Post by: cognoid1 on 23 May 2006 11:07:26 PM
I didn't have any luck with this, therefore, I gave up the idea.

I'm sorry.  :-[