Showing posts with label indicate. Show all posts
Showing posts with label indicate. Show all posts

Friday, March 23, 2012

Indicating the NULL value in Report Expression Syntax

Hi,

I would like to know how I can indicate a NULL value in a report expression in SSRS / Report Designer.

I am trying to code :

IIF(Value_A = 0, <NULL>, Value_A)

It may look weird but I am trying to return NULL values when Value_A is 0 (zero), in the sample scenario above.

I have tried using the keyword "NULL", but it is highlighted as a syntax error, and suggested to use System.DBNull. I tried it and then it says that components of the System collection cannot be used in an expression, so I am left drawing blanks.

Thanks.

regards,
Kenny

Use the VB keyword "Nothing"

=Iif(Fields!Value_A.Value = 0, Nothing, Fields!Value_A.Value)

|||Hi Adam,

Thanks for the tip. Worked like a charm.

Where else can I get a list of VB keywords I can use in Report Designer / SSRS / SQL Server 2005. I have some background with VB6 prior and was hoping I could port a whole bunch of them over to be used here.

Kenny
|||Most global functions were ported to VB.NET and that's what's supported in RS. For more details about RS expressions and the functions start from here http://msdn2.microsoft.com/en-us/library/ms159238.aspx

Wednesday, March 21, 2012

Indicating the NULL value in Report Expression Syntax

Hi,

I would like to know how I can indicate a NULL value in a report expression in SSRS / Report Designer.

I am trying to code :

IIF(Value_A = 0, <NULL>, Value_A)

It may look weird but I am trying to return NULL values when Value_A is 0 (zero), in the sample scenario above.

I have tried using the keyword "NULL", but it is highlighted as a syntax error, and suggested to use System.DBNull. I tried it and then it says that components of the System collection cannot be used in an expression, so I am left drawing blanks.

Thanks.

regards,
Kenny

Use the VB keyword "Nothing"

=Iif(Fields!Value_A.Value = 0, Nothing, Fields!Value_A.Value)

|||Hi Adam,

Thanks for the tip. Worked like a charm.

Where else can I get a list of VB keywords I can use in Report Designer / SSRS / SQL Server 2005. I have some background with VB6 prior and was hoping I could port a whole bunch of them over to be used here.

Kenny
|||Most global functions were ported to VB.NET and that's what's supported in RS. For more details about RS expressions and the functions start from here http://msdn2.microsoft.com/en-us/library/ms159238.aspx

Indexing question

Hello All,
Have seen 2 different databases now both on 2005 STD edition different
servers.
That still indicate fragmentation in their indexes (both clustered and non
clustered) immediately post rebuild proccess. I am looking for broad sweeping
statements to stimulate my thought processes as to why this is occuring.
Thanks in advance,
How many pages do they have? If it is less than 8 you will never get rid of
all the fragmentation since they used mixed extents. But if you show the
results it may help.
Andrew J. Kelly SQL MVP
Solid Quality Mentors
"Joe" <Joe@.discussions.microsoft.com> wrote in message
news:62DBFA8F-1CC4-42ED-A7E4-0AFFB4626BEB@.microsoft.com...
> Hello All,
> Have seen 2 different databases now both on 2005 STD edition different
> servers.
> That still indicate fragmentation in their indexes (both clustered and non
> clustered) immediately post rebuild proccess. I am looking for broad
> sweeping
> statements to stimulate my thought processes as to why this is occuring.
> Thanks in advance,
>

Monday, March 19, 2012

Indexing question

Hello All,
Have seen 2 different databases now both on 2005 STD edition different
servers.
That still indicate fragmentation in their indexes (both clustered and non
clustered) immediately post rebuild proccess. I am looking for broad sweeping
statements to stimulate my thought processes as to why this is occuring.
Thanks in advance,How many pages do they have? If it is less than 8 you will never get rid of
all the fragmentation since they used mixed extents. But if you show the
results it may help.
--
Andrew J. Kelly SQL MVP
Solid Quality Mentors
"Joe" <Joe@.discussions.microsoft.com> wrote in message
news:62DBFA8F-1CC4-42ED-A7E4-0AFFB4626BEB@.microsoft.com...
> Hello All,
> Have seen 2 different databases now both on 2005 STD edition different
> servers.
> That still indicate fragmentation in their indexes (both clustered and non
> clustered) immediately post rebuild proccess. I am looking for broad
> sweeping
> statements to stimulate my thought processes as to why this is occuring.
> Thanks in advance,
>