SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


SSRS Report & Null


SSRS Report & Null

Author
Message
ramana3327
ramana3327
SSCarpal Tunnel
SSCarpal Tunnel (4.7K reputation)SSCarpal Tunnel (4.7K reputation)SSCarpal Tunnel (4.7K reputation)SSCarpal Tunnel (4.7K reputation)SSCarpal Tunnel (4.7K reputation)SSCarpal Tunnel (4.7K reputation)SSCarpal Tunnel (4.7K reputation)SSCarpal Tunnel (4.7K reputation)

Group: General Forum Members
Points: 4683 Visits: 2083
Hi,

I am creating a table report. Which is retrieving customer name, email... When I use the query in the database it is showing null for some columns but when I use the preview in report it is not displaying the value 'null'. What I have to do? I need to display null as it is in the database.

Any idea?

Thanks
ZZartin
ZZartin
SSCertifiable
SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)

Group: General Forum Members
Points: 6094 Visits: 10174
Do you mean you want the report to actually say the text 'null'?

You could modify the reports with ISNULL(<column name>, 'null') statements, or ask whoever is populating those fields to populate them with some value instead of NULL and if you have to add not null constraints on those columns Tongue
ramana3327
ramana3327
SSCarpal Tunnel
SSCarpal Tunnel (4.7K reputation)SSCarpal Tunnel (4.7K reputation)SSCarpal Tunnel (4.7K reputation)SSCarpal Tunnel (4.7K reputation)SSCarpal Tunnel (4.7K reputation)SSCarpal Tunnel (4.7K reputation)SSCarpal Tunnel (4.7K reputation)SSCarpal Tunnel (4.7K reputation)

Group: General Forum Members
Points: 4683 Visits: 2083
Thanks,

Where I can set that property.
ramana3327
ramana3327
SSCarpal Tunnel
SSCarpal Tunnel (4.7K reputation)SSCarpal Tunnel (4.7K reputation)SSCarpal Tunnel (4.7K reputation)SSCarpal Tunnel (4.7K reputation)SSCarpal Tunnel (4.7K reputation)SSCarpal Tunnel (4.7K reputation)SSCarpal Tunnel (4.7K reputation)SSCarpal Tunnel (4.7K reputation)

Group: General Forum Members
Points: 4683 Visits: 2083
I have email column. That allows null. When I retrieve that column in the database it is showing 'null' but same query in the dataset and click on preview it is empty space. I want to display same in the database.
ZZartin
ZZartin
SSCertifiable
SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)

Group: General Forum Members
Points: 6094 Visits: 10174
Keep in mind NULL in the database is not the same as an empty string '', reporting tools will show NULL as a blank space because they don't really know what else to show them as.

If you want yes you can set that column to not allow nulls at the database level but that will first require you cleaning up all the existing nulls in your database and then presumably working with whoever is populating that column so they know what they have to set that column to, if you just add that constraint without telling anyone people will start getting hard errors from the database whenever they try to write a null value.

What problems exactly is this causing?
ramana3327
ramana3327
SSCarpal Tunnel
SSCarpal Tunnel (4.7K reputation)SSCarpal Tunnel (4.7K reputation)SSCarpal Tunnel (4.7K reputation)SSCarpal Tunnel (4.7K reputation)SSCarpal Tunnel (4.7K reputation)SSCarpal Tunnel (4.7K reputation)SSCarpal Tunnel (4.7K reputation)SSCarpal Tunnel (4.7K reputation)

Group: General Forum Members
Points: 4683 Visits: 2083
No.

I don't want do change anything in the database. Just I want to change it in the report display. I have 2-3 columns like that which is showing empty. Just I want to display null instead of empty.
ramana3327
ramana3327
SSCarpal Tunnel
SSCarpal Tunnel (4.7K reputation)SSCarpal Tunnel (4.7K reputation)SSCarpal Tunnel (4.7K reputation)SSCarpal Tunnel (4.7K reputation)SSCarpal Tunnel (4.7K reputation)SSCarpal Tunnel (4.7K reputation)SSCarpal Tunnel (4.7K reputation)SSCarpal Tunnel (4.7K reputation)

Group: General Forum Members
Points: 4683 Visits: 2083
I have few columns in my report.
Email & Purchase date.. . In that email column & Purchase date some people don't have email Id. i..e My report shows some has values and some blank. I want to display null instead of blank (empty) and keep as it is for remaining.

I need help

=iif(Fields!name.Value="","Null",Fields!name.Value)

I use that expression but it is showing error when there is value in the column.

Help me out please. Correct me the wrong in the above expression
ZZartin
ZZartin
SSCertifiable
SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)SSCertifiable (6.1K reputation)

Group: General Forum Members
Points: 6094 Visits: 10174
Ramana, null is not the same as an empty string. Try, IsNothing(Fields!name.Value)
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search