Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

SSRS Report & Null Expand / Collapse
Author
Message
Posted Thursday, August 28, 2014 11:18 AM
Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Today @ 6:56 AM
Points: 511, Visits: 599
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
Post #1608352
Posted Thursday, August 28, 2014 12:13 PM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Today @ 7:37 AM
Points: 294, Visits: 614
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 :P
Post #1608373
Posted Thursday, August 28, 2014 12:28 PM
Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Today @ 6:56 AM
Points: 511, Visits: 599
Thanks,

Where I can set that property.
Post #1608382
Posted Thursday, August 28, 2014 1:17 PM
Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Today @ 6:56 AM
Points: 511, Visits: 599
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.
Post #1608393
Posted Thursday, August 28, 2014 1:35 PM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Today @ 7:37 AM
Points: 294, Visits: 614
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?
Post #1608400
Posted Thursday, August 28, 2014 4:06 PM
Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Today @ 6:56 AM
Points: 511, Visits: 599
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.
Post #1608438
Posted Friday, August 29, 2014 6:55 AM
Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Today @ 6:56 AM
Points: 511, Visits: 599
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
Post #1608584
Posted Friday, August 29, 2014 7:14 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Today @ 7:37 AM
Points: 294, Visits: 614
Ramana, null is not the same as an empty string. Try, IsNothing(Fields!name.Value)
Post #1608589
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse