Results 1 to 9 of 9

Thread: Plaese Help urgently"using isNull function is not working plaese post correct format

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2006
    Posts
    12

    Question Plaese Help urgently"using isNull function is not working plaese post correct format

    Hi dear

    i am generating a report in CR 8.0 my requirement is check a datefield (deliveryNoteDate) if its Null then its show a messsage "UnDelivered"

    else if its not Null then show message "delivered"

    Report format

    Item status
    ------- -------
    abc delivered '(Here DeliveryNoteDate is not NULL)
    cfrd undelivered '(Here DeliveryNoteDate is NULL)


    Please anyone expert in CR8.0 help.

    Thanks in advance

  2. #2
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Plaese Help urgently"using isNull function is not working plaese post correct format

    I assume the datefield is a checkbox in an Access db? If it is then it will never be nul as it will be checked or unchecked (0, -1).
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  3. #3

    Thread Starter
    New Member
    Join Date
    Feb 2006
    Posts
    12

    Lightbulb Re: Plaese Help urgently"using isNull function is not working plaese post correct format

    Rob Thanks for replying


    and the database i am using is not Acess its on Oracle 8i & its datatype is Date

    More u know i am creating two repots one is for example

    1)Vehicles Delivered Report
    =====================

    Vehicles Status
    ======= ========
    coure Delivered
    altis Delivered
    Gli Delivered

    2)Vehicles UN-Delivered Report
    ========================


    Vehicles Status
    ======= ========
    coure UnDelivered
    altis UnDelivered
    Gli UnDelivered

    so when i made the first report Delivered Report
    i use the following condition & its works

    Code looks like
    ============

    formula name=@chk

    dim strV as string
    if Not isnull({VEHICLEDETAILS.DELIVERYNOTEDATE}) then
    strV = "Vehicle Delivered"
    end if
    formula = strV
    this code works & generating the reports
    =============================

    but in other report Vehicles Undelivered report i am using below code but its didnt displayed my required message


    dim strV as string
    if isnull({VEHICLEDETAILS.DELIVERYNOTEDATE}) then
    strV = "Vehicle Not Delivered"
    end if
    formula = strV
    =====================================


    I think now it wud be easy for u to give me appropriate solution

    Thanks for ur care & quick reply

    i will be waiting for ur reply plaese do reply as soon as posible

    sincerely urs
    anwar zaman
    Manger IT
    TRM

  4. #4
    PowerPoster
    Join Date
    Feb 2006
    Location
    East of NYC, USA
    Posts
    5,691

    Re: Plaese Help urgently"using isNull function is not working plaese post correct fo

    Quote Originally Posted by anwar zaman
    the database i am using is not Acess its on Oracle 8i & its datatype is Date
    Oracle doesn't have a null date - ALL date fields have data, even if it's "no date". Pick a "null" date and use that as null. (We use 11/17/1858 to mean "no date". Pick one that's legal but impossible - far in the past, 200 years in the future, something that means "null" to you.)

  5. #5
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758

    Re: Plaese Help urgently"using isNull function is not working plaese post correct format

    Oracle doesn't have a null date
    That makes no sense to me. I have hundreds of queries against an Oracle database using something like

    Where DateField Is Null - They all work.

    How are you connecting to the database (OLEDB, ODBC, Native Driver)? There is an report option to "Convert Null Fields to Default Values" maybe that is affecting the report.

    What is displayed if you put the DELIVERYNOTEDATE field directly on the report?

  6. #6
    A SQL Server fool GaryMazzone's Avatar
    Join Date
    Aug 2005
    Location
    Dover,NH
    Posts
    7,493

    Re: Plaese Help urgently"using isNull function is not working plaese post correct format

    Oracle can definately accept a NULL into a Date/Time field. Just set the fieldvalue to NULL when you insert or update if you want the date field to be blanked.
    Sometimes the Programmer
    Sometimes the DBA

    Mazz1

  7. #7
    PowerPoster
    Join Date
    Feb 2006
    Location
    East of NYC, USA
    Posts
    5,691

    Re: Plaese Help urgently"using isNull function is not working plaese post correct fo

    Quote Originally Posted by GaryMazzone
    Oracle can definately accept a NULL into a Date/Time field. Just set the fieldvalue to NULL when you insert or update if you want the date field to be blanked.
    It must depend on the version of Oracle - on a Vax if you insert a null date field you generate an error.

  8. #8
    A SQL Server fool GaryMazzone's Avatar
    Join Date
    Aug 2005
    Location
    Dover,NH
    Posts
    7,493

    Re: Plaese Help urgently"using isNull function is not working plaese post correct format

    I have done this on Oracle running on Windows,Unix (HP) and various version of Linux. It should not matter as to what OS the Oracle core should still allow this as long as the database allows NULLs in the field.
    Sometimes the Programmer
    Sometimes the DBA

    Mazz1

  9. #9
    New Member
    Join Date
    Apr 2006
    Posts
    3

    Lightbulb Re: Plaese Help urgently"using isNull function is not working plaese post correct fo

    I have found that Crystal, at times, has issues with NULL values. I too have used Crystal with Oracle, and encountered peculiar effects when testing against null, even using the report options to convert nulls, and using isnull.

    What I have found the best is to edit the sql crystal passes to the db. Using nvl(FIELD,'VALUE'), one can convert the null values to a "testable" value, which passes muster with Crystal.

    You may want to create a View in Oracle which will pull the fields you need, using nvl to convert out the nulls, and have crystal pull from this View. This has led to success for a number of reports for me.

    HTH.
    R.

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