all groups > sql server reporting services > july 2005 >
You're in the

sql server reporting services

group:

Converting Integer Parameter To String!


RE: Converting Integer Parameter To String! Jan Pieter Posthuma
7/6/2005 8:17:46 AM
sql server reporting services:
Hi,

You can use CStr() for converting Integers to Strings. So in your case it
would be CStr(Parameters!MyInt.Value)

--
| Jan Pieter Posthuma
--


[quoted text, click to view]
Re: Converting Integer Parameter To String! Bruce L-C [MVP]
7/6/2005 11:47:52 AM
This is VB syntax. I think you can make this much easier. Just put in &
instead of the plus. Don't bother with any of the other stuff. It should
work find. I.e.

="MyInt: " & Parameters!MyInt.Value

[quoted text, click to view]

Converting Integer Parameter To String! Nitin M
7/6/2005 5:39:10 PM
Hi,

I am trying to print the value of the report parameters in the report. I
want this because once I print the report I lose the parameters with with
the report was run.

I have a integer parameter and I am using the following expression to get
the parameter's value.

="MyInt: " + Iif ( Parameters!MyInt.Value is Nothing, "(null)",
Parameters!MyInt.Value.ToString())

Now
1. If MyInt is NULL, then the above expression throws an error, in spite
of the "is Nothing" clause being present. I feel the second expression is
getting evaluated nevertheless.
2. Not putting ".ToString()" will throw an error if the parameter has a
NON NULL value.

How should one handle this case? Is it possible to do it in an expression?

Thanks in anticipation.
Nitin

Re: Converting Integer Parameter To String! Nitin M
7/7/2005 12:00:00 AM
Thanks a lot Bruce. Simple solution that worked.

[quoted text, click to view]

AddThis Social Bookmark Button