cancel
Showing results for 
Search instead for 
Did you mean: 

How to show "na" when value is suppressed.

Former Member
0 Kudos

Dear all, I have report created under CR 2008 and it has parameter values which are conditional. What I would like to do is to set up those parameters in such a manner that if the parameter value is empty, the preview mode should show n/a.

For example

I have three optional parameters. Account Number, Product Code and Sales Area.

Currently if user opt out from Account number, the report shows a blank white space there. Which kind of look bad. So I was thinking that if it is possible, when a value is suppressed, it should show n/a, letting an user know that the value has not been selected instead of an empty space.

Can this be done? if yes then how?

I have setup suppression like, right click on the field->Format->Common tab->Suppress x+2->not hasvalue({Account Number}).

This allows the report not to show any company account number if not chosen in the parameter value.

How can I show "n/a".

Any help in this case would be highly appereciated.

Many thanks

Regards

Jehanzeb

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Jehanzeb Navid

I think you can do this by creating a formula and apply a suppress conditiona like :

Create a formula like :

Stringvar na;

na:="n / a";

Now place this formula beside Account number filed and apply a suppress condition like :

hasvalue({Account Number})

When you have no value in Account number it will print other wise it will suppress n/a.

Hope this will help you

Thanks,

Sastry

Former Member
0 Kudos

Thanks Sastry,

I have tried that already but the problem is that Account name is placed next to Account Number. So the whole thing spans to the end of line of the page.

Example

Account Number: Account Name: [Page end here]

I can't really add another field next to it.

Can't that be replaced conditionally? I mean the field under suppression formula or maybe under display string conditionally?

regards

Jehanzeb

Former Member
0 Kudos

Hi J,

I have created a parameter in CR 2008 {?country} and created a formula like :

If hasvalue({?country}) then

{?country}

else

"n / a"

This I placed in placed of country, now if I give some value to country it is printing country else it is printing n/a

Can you try this

Thanks,

Sastry

Former Member
0 Kudos

Superb!!!

Thanks, This works like a charm )

Regards

J

Answers (0)