CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2009
    Posts
    26

    how to display null-date as blank space in the ms report (+mssql2008) ?

    I have ms report showing data from mssql2008 server
    When date-field is null an error message appears
    Then I modify "select .... aDate... from.." as "select .... isnull(aDate,'')... from.."
    And when date-field is null I get "01.01.1900"
    ---
    so how to show blank when date-field is null ?

  2. #2
    Join Date
    Aug 2010
    Posts
    5

    Re: how to display null-date as blank space in the ms report (+mssql2008) ?

    Ivanov, please be a little more descriptive as to what you are trying to accomplish.

    From what I am gathering so far, you are trying to return data for a microsoft report using a select statement, but are trying to return a empty string or no value if there is a null in a date field?
    If this is the case, you need to let the query return whatever its going to return and handle the returned value in the field itself by setting a property. Is the Microsoft reporting services you are using? There are ways of handling returned values within the report itself. Its been a while since I have used this, but I would start by looking at the report designer and properties for the field you are concerned about.

  3. #3
    Join Date
    Jul 2009
    Posts
    26

    Re: how to display null-date as blank space in the ms report (+mssql2008) ?

    Thank you for response..
    I use a c# program with "stumulasoft reports .net" report system (very like MS Report )
    Data are in ms sql server2008
    In the datasource I use t-sql command "select .....aDate.. from aTable...."
    aDate column is date type column
    Every record had a value and everything was okay
    Yesterday a field had lost its value and it is null
    And report started to shows an error message
    I have changed the simple t-sql query to "isnull (aDate,'')"
    Now everything is ok but null-date field appears to be "01.01.1900"
    And I do not know what and when sql=server or report-system does this mystery
    I want blank space or empty or something like that..

    Ok tomorrow I will check field-properties in the the report-system again

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured