SSRS Report & Null

  • 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

  • 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 😛

  • Thanks,

    Where I can set that property.

  • 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.

  • 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?

  • 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.

  • 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

  • Ramana, null is not the same as an empty string. Try, IsNothing(Fields!name.Value)

  • Hi ,

    I had the same question as you , here u go with a solution .

    In the SSRS text box expression type the following by updating your fields name .

    =IIf(ISNothing(Fields!YourFeild.Value),"NULL",(Fields!YourFeild.Value))

    Thanks ,

    Divya.S

Viewing 9 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic. Login to reply