Sage MAS 90 and 200 Sage MAS 500 blogs Product Feedback Support Training
Reply
Sage MAS Partner
BillMac
Posts: 29
Registered: 01-14-2009
0

Conditional statement in Crystal 10.0

I would like to enter a text box in Crystal 10.0 sales order invoice printing that will only print if the payment type is MC, VISA or AMEX.  The idea is to use a conditional statement that prints " This invoice has been paid by (card type) ending in XXXX." somewhere on the invoice. Any help would be appreciated.

Super Contributor
connex
Posts: 794
Registered: 10-29-2008
0

Re: Conditional statement in Crystal 10.0

Create a field like this...

 

" This invoice has been paid by (card type) ending in " & {SO_InvoiceWrk.Last4UnencryptedCreditCardNos}

 

...and put a suppression conditional on it like this...

 

Not({SO_InvoiceWrk.PaymentType} in ["AMEX", "MC", "VISA"])

 

Dan Burleson
Sage Authorized Consultant - Ask me about advanced scripting!
e-mail me here
Sage MAS Partner
BillMac
Posts: 29
Registered: 01-14-2009
0

Re: Conditional statement in Crystal 10.0

Thanks for your reply. I have added a formula field that reads like this:  "This invoice has been paid by a" & {SO_InvoiceWrk.PaymentType}& "ending in" & {SO_InvoiceWrk.Last4UnencryptedCreditCardNos}.  I then went to format field and on the common tab selected “suppress display”, but that does not seem to work.  Am I going about this correctly?

 

Super Contributor
connex
Posts: 794
Registered: 10-29-2008
0

Re: Conditional statement in Crystal 10.0

It sounds as if you didn't put the second expression from my original response into the suppression conditional. 

 

You would not check the box for Suppress - rather click the "X+2 over a pencil" icon and enter the formula that I gave before. Leave the check box - unchecked. In this way it only suppresses the first formula when the payment type is other than those that need the note.

Dan Burleson
Sage Authorized Consultant - Ask me about advanced scripting!
e-mail me here
Sage MAS Partner
BillMac
Posts: 29
Registered: 01-14-2009
0

Re: Conditional statement in Crystal 10.0

 Phase II

 

I now have a requirement to add a banner, water mark, whatever that says " Do Not Mail". It is based on a UDF in the customer master file that is a simple Y/N answer.  I added a another page header that uses suppression based on the Y/N answer. I need to have this display when appropriate along with the " Paid by Credit card" field previously setup.  In testing the underlay following is causing the second header to be stepped on and shows up blank.

 

BillMac