cancel
Showing results for 
Search instead for 
Did you mean: 

Crystal Report bypass Single qoute

former_member264311
Participant
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

former_member264311
Participant
0 Kudos
Thanks Engr. Taseeb,

But cant get the best result. All CardCode has single qoute('), there's nothing appear in select box.

Regards and Thanks

Answers (2)

Answers (2)

Johan_H
Active Contributor
0 Kudos

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´

Former Member
0 Kudos

You could try removing '

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

Ian

former_member264311
Participant
0 Kudos

Hi Ian,

How can apply that could? like

Reference@ Select JDT1.Ref1 From JDT1 where

(Replace(JDT1.Shortname, "'","") = '@Customer') and ( (JDT1.BalDueDeb - JDT1.BalDueCred)<>0)
??

Thanks

former_member264311
Participant
0 Kudos

Still cant get the answer.

Thanks