Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XI - question message error

Status
Not open for further replies.

campia

Technical User
Joined
Apr 20, 2007
Messages
77
Location
BE
Hi,

I'm trying to group two fields in one and to rename it. I use this formula, but I have the error: "The special variable Formula must be assigned a value within the formula" . What it means?

Dim var

If {CTSTICKET.TICOMPANY} = "MIC" or {CTSTICKET.TICOMPANY} = "MIC-MOVE" Then
var = "Milicom"
elseif {CTSTICKET.TICOMPANY} = "Administration Judiciaire" or {CTSTICKET.TICOMPANY} = "Centre Informatique de l'Etat" Then
var = "Centre Informatique de l'Etat"
End If
 
I am not sure how this is done in VB Syntax, but in crystal syntax this should work:

WhilePrintingRecords;
If {CTSTICKET.TICOMPANY} = "MIC" or {CTSTICKET.TICOMPANY} = "MIC-MOVE" Then Stringvar var:="Milicom";
else if {CTSTICKET.TICOMPANY} = "Administration Judiciaire" or {CTSTICKET.TICOMPANY} = "Centre Informatique de l'Etat" Then Stringvar var:= "Centre Informatique de l'Etat";

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports

"If you have a big enough dictionary, just about everything is a word"
--Dave Barry
 
You don't really need a variable for this. You could create a formula:

If {CTSTICKET.TICOMPANY} in ["MIC", "MIC-MOVE"] Then
"Milicom" else
if {CTSTICKET.TICOMPANY} in ["Administration Judiciaire", "Centre Informatique de l'Etat"] Then
"Centre Informatique de l'Etat"

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top