Sage 100

 View Only
  • 1.  Crystal Report - Parameter Definition

    Posted 09-11-2020 11:17
    I have a Crystal report selecting static records from AR_InvoiceHistoryHeader by ShipToCode.  How do I select the blank NULL records only?  I want the user to be able to enter either a Ship-to code to display records for one ship to address or to be able to select records that do not have a ship to code (ship to code was blank during data entry).

    ------------------------------
    Doug Higgs
    Midwest Commerce Solutions, Inc
    (312) 315-0960
    Assistant to the Traveling Secretary
    ------------------------------


  • 2.  RE: Crystal Report - Parameter Definition

    Posted 09-11-2020 11:22
    Set the parameter to optional, then in your selection criteria put in an "if hasvalue(parametername) then ... else..." clause to handle the logic.

    ------------------------------
    Kevin Moyes
    Technical Systems Analyst
    Munjal White Consulting Co.
    Toronto ON
    ------------------------------



  • 3.  RE: Crystal Report - Parameter Definition

    Posted 09-11-2020 11:26


    ------------------------------
    Kevin Moyes
    Technical Systems Analyst
    Munjal White Consulting Co.
    Toronto ON
    ------------------------------



  • 4.  RE: Crystal Report - Parameter Definition

    Posted 09-11-2020 11:49
    @Kevin Moyes  Thank you!  Works fabulously.  For the record, here is the formula I used:

    if hasvalue({?Ship To Code}) then {AR_InvoiceHistoryHeader.ShipToCode} = {?Ship To Code}
    else IsNull({AR_InvoiceHistoryHeader.ShipToCode}) and
    {AR_InvoiceHistoryHeader.TransactionDate} = {?date range} and
    {AR_InvoiceHistoryHeader.CustomerNo} = {?customer range}

    I never know if a Sage 100 field without a value is considered null or not.  I see your logic defends against both scenarios.  I am going to add the ="" to mine also.





    ------------------------------
    Doug Higgs
    Midwest Commerce Solutions, Inc
    (312) 315-0960
    Assistant to the Traveling Secretary
    ------------------------------



  • 5.  RE: Crystal Report - Parameter Definition

    Posted 09-11-2020 12:23
    Typically only UDF's should ever be "null" (for existing records when adding a UDF) but odd things do happen sometimes.  I always check for both nulls and blanks to cover all the bases.

    ------------------------------
    Kevin Moyes
    Technical Systems Analyst
    Munjal White Consulting Co.
    Toronto ON
    ------------------------------



  • 6.  RE: Crystal Report - Parameter Definition

    Posted 09-11-2020 12:28
    That's interesting because the selection worked using only IsNull({AR_InvoiceHistoryHeader.ShipToCode}) meaning Crystal thinks the ShipToCode field is null even though it isn't a UDF.

    ------------------------------
    Doug Higgs
    Midwest Commerce Solutions, Inc
    (312) 315-0960
    Assistant to the Traveling Secretary
    ------------------------------



  • 7.  RE: Crystal Report - Parameter Definition

    Posted 09-11-2020 12:33
    There are report options which might be enabled to explain that.


    ------------------------------
    Kevin Moyes
    Technical Systems Analyst
    Munjal White Consulting Co.
    Toronto ON
    ------------------------------