Skip to Content

Crystal Report bypass Single qoute

Good Day,

Please help me expert I cant show the transaction base on my parameter when the customer code has a single qoute like C_Samantha's

this is my parameter:

Reference@ Select JDT1.Ref1 From JDT1 where (JDT1.Shortname='@Customer') and ( (JDT1.BalDueDeb - JDT1.BalDueCred)<>0)

Thanks

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Mar 06, 2017 at 05:02 AM

    Hello,

    Update your parameter with following

    Reference@ Select JDT1.Ref1 From JDT1 where (REPLACE(JDT1.Shortname,'''','') =REPLACE('@Customer','''','')) and ( (JDT1.BalDueDeb - JDT1.BalDueCred)<>0)

    Thanks

    Regards,

    Engr. Taseeb Saeed

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 03, 2017 at 10:26 AM

    You could try removing '

    Replace(JDT1.Shortname, "'","")

    Ian

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 07, 2017 at 07:21 AM

    Hi,

    In general it is not recommended to use single or double quotes in identifier type fields (CardCode, CardName, ItemCode, ItemName, etc). If necessary try to use accents instead: ´´. Looks the same but does not cause problems in queries, Crystal Reports, and on web pages.

    Regards,

    ´Johan´

    Add comment
    10|10000 characters needed characters exceeded