Answered by:
No data in textbox

Question
-
I have a table with 4 columns, one of which is populated using an expression. If this expression returns a null value I wish to display the message 'No Data Available', can this be done? I don't want to use the norows property as the other 4 columns are constantly populatedMonday, August 1, 2011 3:58 PM
Answers
-
Hi,
As I menitioned you early you need to do something like this,
= IIf ( Fields!Change_Type.Value = 0, 1, Fields!Change_Type.Value )
I'm assuming Change_Type is have Integer Data-Type.Thanks
Kumar
Please do let us know your feedback. Thank You - KG, MCTS- Marked as answer by Eileen Zhao Monday, August 8, 2011 8:33 AM
Tuesday, August 2, 2011 4:01 PM
All replies
-
Hi,
Try this under column expression,
= IIf ( IsNothing ( Fields!Column-name.Value ), "No Data Available", Fields!Column-name.Value )
Please let us know your feedback.
Thanks
Kumar
Please do let us know your feedback. Thank You - KG, MCTSMonday, August 1, 2011 4:05 PM -
Hi Kumar,
Do I place this in the same field as I have my calculating expression? Is there a way I can refer to the specific textbox or column?
Monday, August 1, 2011 4:09 PM -
Hi,
You have to write at the same location where you have write your calculating expression, something like this:-
= IIf ( IsNothing ( YOUR CALCULATING EXPRESSION ), "No Data Available", YOUR CALCULATING EXPRESSION )
Thanks
Kumar
Please do let us know your feedback. Thank You - KG, MCTSMonday, August 1, 2011 4:13 PM -
Hi Kumar,
I have tried inserting the above expression into my textbox however it is showing NaN which I think is the default no data message?
Monday, August 1, 2011 4:43 PM -
Hi,
Can you describe you req. fully with correct CALCULATING expression which you are keeping?
I'm lost.
Thanks
Kumar
Please do let us know your feedback. Thank You - KG, MCTSMonday, August 1, 2011 4:56 PM -
Hi Kumar,
Sorry I realise I've explained this is a really awkward way. My table has four columns with one row. The first two are text fields, the third an expression and the fourth a chart.
In the third column/textbox the expression is =Sum(iif(Fields!Type.Value = "2000", 0, 1)) / Count(Fields!IDNo.Value). Currently if this expression has no result due to there being no values in either field the field shows "NaN", however I would like this to show "No data available"
Monday, August 1, 2011 5:14 PM -
I have also tried using this expression in the textbox
=Iif(Sum(iif(Fields!Change_Type.Value = "2000", 0, 1)) / Count(Fields!Infrastructure_Change_ID.Value) = "NaN", "No data available", Sum(iif(Fields!Change_Type.Value = "2000", 0, 1)) / Count(Fields!Infrastructure_Change_ID.Value))
Monday, August 1, 2011 5:19 PM -
Hi,
Try this,
= IIf ( IsNothing ( (Fields!Change_Type.Value ) OR IsNothing ( Fields!Infrastructure_Change_ID.Value ), "No data available", Sum ( IIf ( Fields!Type.Value = "2000", 0, 1 ) ) / Count ( Fields!IDNo.Value ) )
Thanks
Kumar
Please do let us know your feedback. Thank You - KG, MCTSMonday, August 1, 2011 5:30 PM -
Hi Kumar,
The texbox now appears empty
Monday, August 1, 2011 5:49 PM -
Which means you don't any value into both the fields ( Fields!Change_Type.Value AND Fields!Infrastructure_Change_ID.Value ).
Does they ever have any values?
Please do let us know your feedback. Thank You - KG, MCTSMonday, August 1, 2011 5:50 PM -
Hi,
Narrow down you problem step by step, try this,
= Sum ( IIf ( Fields!Type.Value = "2000", 0, 1 ) )
Does above thing work correctly? What is the value, can you paste it?
Thanks
Kumar
Please do let us know your feedback. Thank You - KG, MCTSMonday, August 1, 2011 5:56 PM -
Hi Kumar,
The textbox is blank
Monday, August 1, 2011 6:07 PM -
Hi,
Ok. try this,
=Fields!Type.Value
what is the value? Does it prints you any values ever?
Thanks
Kumar
Please do let us know your feedback. Thank You - KG, MCTSMonday, August 1, 2011 6:13 PM -
@RLautman,
Try using this
IIf( Denominator expression =0 or calculating field is Nothing,"Nodata available", your expression)
so it would be
=IIf(Count(Fields!IDNo.Value)=0 Or Sum(iif(Fields!Type.Value = "2000", 0, 1)) / Count(Fields!IDNo.Value) Is Nothing," No Data Available ",
Sum(iif(Fields!Type.Value = "2000", 0, 1)) / Count(Fields!IDNo.Value))
Thanks,
FunBI
- Proposed as answer by FunBI Monday, August 1, 2011 7:01 PM
Monday, August 1, 2011 6:19 PM -
Hi Kumar,
I've ran the stored procedure for this table and it has no values, would this prevent the "No Data Available" message appearing?
Monday, August 1, 2011 6:45 PM -
I have tried the first expression you suggested -
= IIf ( IsNothing ( YOUR CALCULATING EXPRESSION ), "No Data Available", YOUR CALCULATING EXPRESSION )
on an expression that uses a parameters of a start date two months before the report is run and which has a stored procedure that does contain data and the textbox displays NaNMonday, August 1, 2011 6:52 PM -
try this,
= IIf ( IsNothing ( Fields!Change_Type.Value ) OR Fields!Change_Type.Value = "" OR IsNothing ( Fields!Infrastructure_Change_ID.Value ) OR Fields!Infrastructure_Change_ID.Value = "", "No data available", Sum ( IIf ( Fields!Type.Value = "2000", 0, 1 ) ) / Count ( Fields!IDNo.Value ) )
ThanksKumar
Please do let us know your feedback. Thank You - KG, MCTSMonday, August 1, 2011 7:02 PM -
Hi Kumar,
I have checked with my managers and they are happy to go ahead with the field showing NaN however they want to ensure the message 'Infinity' does not show when expressions calculate an infinite value. Would this be a similar method?
Thanks
Tuesday, August 2, 2011 10:55 AM -
Yes.... if you divide with zero it will procedure infinite or #Error message.
Please do let us know your feedback. Thank You - KG, MCTSTuesday, August 2, 2011 1:57 PM -
I wish to suppress this infinite or #Error message - can this be done?Tuesday, August 2, 2011 3:57 PM
-
Hi,
As I menitioned you early you need to do something like this,
= IIf ( Fields!Change_Type.Value = 0, 1, Fields!Change_Type.Value )
I'm assuming Change_Type is have Integer Data-Type.Thanks
Kumar
Please do let us know your feedback. Thank You - KG, MCTS- Marked as answer by Eileen Zhao Monday, August 8, 2011 8:33 AM
Tuesday, August 2, 2011 4:01 PM -
@RLautman
Please try this
=IIf(Count(Fields!IDNo.Value)=0 Or Sum(iif(Fields!Type.Value = "2000", 0, 1)) / Count(Fields!IDNo.Value) Is Nothing," No Data Available ",
Sum(iif(Fields!Type.Value = "2000", 0, 1)) / Count(Fields!IDNo.Value))
Thanks,
FunBI
Wednesday, August 3, 2011 8:33 PM