Author Topic: Conditional Block  (Read 1714 times)

Offline cognoid1

  • Full Member
  • ***
  • Posts: 14
  • Forum Citizenship: +0/-1
Conditional Block
« on: 18 Feb 2006 01:51:19 am »
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.

Offline Draoued

  • Global Moderator
  • Community Leader
  • *****
  • Posts: 96
  • Forum Citizenship: +12/-0
Re: Conditional Block
« Reply #1 on: 20 Feb 2006 05:35:18 pm »

Offline addpremkumar

  • Full Member
  • ***
  • Posts: 47
  • Forum Citizenship: +3/-1
Re: Conditional Block
« Reply #2 on: 20 Feb 2006 07:27:17 pm »
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...


Offline mrcool

  • Statesman
  • ******
  • Posts: 258
  • Forum Citizenship: +27/-28
Re: Conditional Block
« Reply #3 on: 22 Feb 2006 11:34:55 am »
Hi,

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

If true then show the cross tab else Hide..


Thanks,
S


Offline gfordham

  • Associate
  • **
  • Posts: 2
  • Forum Citizenship: +0/-0
Re: Conditional Block
« Reply #4 on: 24 Feb 2006 11:06:03 pm »
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

Offline zenith

  • Full Member
  • ***
  • Posts: 40
  • Forum Citizenship: +1/-0
Re: Conditional Block
« Reply #5 on: 27 Feb 2006 05:20:20 pm »
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

Offline bdybldr

  • Global Moderator
  • Statesman
  • *****
  • Posts: 275
  • Forum Citizenship: +7/-1
Re: Conditional Block
« Reply #6 on: 22 May 2006 09:37:43 pm »
Cognoid,
Will you give us an update on this?  Has the issue been resolved.  If so, How did you do it?

Offline cognoid1

  • Full Member
  • ***
  • Posts: 14
  • Forum Citizenship: +0/-1
Re: Conditional Block
« Reply #7 on: 24 May 2006 10:07:26 am »
I didn't have any luck with this, therefore, I gave up the idea.

I'm sorry.  :-[