Switch case using Crystal Report

Sometimes may occur that you need to use the construct SWITCH-CASE in a Formula Field.

Well, the syntax is really simple:

Switch( condition, what_output, condition, what_output….)

for example

Switch ([customer.sex] = “Male”, “You are Welcome”, [customer.sex] = “Female”, “You are VERY Welcome”) :)

nothing more,nothing less

 

E.

Published 22 ott 2009 12:27 da Nezumi
Inserito sotto:

Commenti

giovedì 22 ottobre 2009 14.14 da Liccardi Antonio

# re: Switch case using Crystal Report

E' supportato in tutte le versioni dei linguaggi? Oppure è una cosa nuova?

giovedì 22 ottobre 2009 14.27 da Michele Aponte

# re: Switch case using Crystal Report

Penso che il codice si riferisca a Crystal Report...quindi è il suo linguaggio interno, giusto Nezu?

giovedì 22 ottobre 2009 17.24 da Nezumi

# re: Switch case using Crystal Report

scusate il ritardo...comunque questo è il "linguaggio" per la crezione delle formule in C.R.