Skip to Content
avatar image
Former Member

Field with no Value

I use CR 2008 and make an Report on Navision5

In the Table I select a field (Varchar10 -notnull) the value is '' means empty.

On SQL Server i can make selections like ...where field=''

In CR I cant edit/change(backgr.color) if it is empty - if there is a value it works.

How can I solve this. SP1 and SP2 installed

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Sep 04, 2008 at 02:30 PM

    Tony,

    Not being able to change the background color of a field usually only occurs when the value isnull. Try creating a formula to check if the value is coming in as a null;

    isnull( )

    If it comes back as true then you might want to enable the Report Option Convert Database Null values to default. This will convert a null string to ''

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Graham Cunningham

      Please don't apologise. I'm thankful for any help.

      If I can use a formular, how should the formular look?

      To understand my Problem:

      -


      Here my steps in SQL-Server(2005):

      CREATE TABLE [atest](

      [Counter] [int] NOT NULL,

      [textfield] [varchar](10) NOT NULL,

      )

      -


      INSERT INTO [dbo].[atest]

      ([Counter]

      ,[textfield])

      VALUES

      (1,'')

      -


      INSERT INTO [dbo].[atest]

      ([Counter]

      ,[textfield])

      VALUES

      (2,'text')

      -


      select * from test where textfield=''

      returns 1

      -


      Then the steps in CR2008:

      Insert the fields in Detail-Section

      right klick on the field --> format field...

      'X+2' Button on Show string

      Formular: If {atest.textfield}='' THEN 'not found' Else {atest.textfield}

      result:

      1

      2 text

      change Formular:

      If isnull({atest.textfield}) THEN 'not found' Else {atest.textfield}

      the same result??

      In Reportoptions I set the first two checkboxes:

      Convert Null Values to standard

      Convert other Null Vales to standard

  • avatar image
    Former Member
    Sep 04, 2008 at 02:27 PM

    What?

    Can you please give us more information?

    Steps you take, what occurs, etc....

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 09, 2008 at 01:20 PM

    Tony,

    Why can't you say "where not equal value" ? (sorry, some symbols don't show up)

    That way you don't care if it's null or not.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Sorry, sorry, sorry.

      I should read, and make how Graham Cunningham say:

      1. Make a formular field formular1

      2. Formular is: If {atest.textfield}='' THEN 'not found' Else {atest.textfield}

      3. Insert THIS!!! field(formular1) in the report

      Now it works.

      Thank you!!

      Edited by: Tony Becker on Sep 10, 2008 11:33 AM

      Edited by: Tony Becker on Sep 10, 2008 11:35 AM