Microsoft
Software
Hardware
Network
Question : correct syntax for a switch statement in crystal 2008
Hello all,
I had a question before that LinInDenver: answered for me quite well and I closed it because I had the begining of my statement working and thought it was all good but now I'm gettng an error when I attempt to check the formula it tells me a ) is missing and I'm unsure where I went wrong. Here is the text of the formula, ive reduced it quite a bit from what will be neeeded but I'm just making sure I have the format correct:
NumberVar BP;
Shared Numbervar BPTotal;
Local Numbervar totalloan;
totalloan := Sum ({ISB_Commissions_view.tot
alloanamou
nt}, {@LO});
BP:=
IF {CB_Originator_View.ComTyp
e} = 1
THEN
IF {ISB_Commissions_view.alia
s2} = "ISB"
THEN (switch totalloan < 5000000, 30,
totoalloan in 500000 to 999999, 35,
TRUE, 50)
BPTotal:=BPTotal+BP;
BP
The formula workshop formula checker tells me that I am missing a ) and it highlights the variable "totalloan". but that doesn't seem to make sense to me.
Also I accepted the answer to my question and gave the points to LilinDenver and then realised that James0628: had also presented a solution, Sorry James, I would have split the points but I didn't see your response!
Answer : correct syntax for a switch statement in crystal 2008
The Switch function requires a (, this is the example from Help:
Switch ({Orders.Order Amount} > 5000, "large",
{Orders.Order Amount} > 1000, "medium",
True, "small")
Random Solutions
Gateway for Server automatically being removed after restart
How do I combine CustomValidators with RequiredFieldValidators and RegularExpressionValidator
s?
Seeking advice on a hosting vendor
How Do I Create a Pie Chart from a DataTable
Maxtor OneTouch 4 Family drive is no longer working
OWA 2010 "the page isn't redirecting properly"...
Trying to redirect a user from http to https automatically. Windows 2008 running II7
Access 2007 and sendkeys
SQL 2005 Query Help
java.lang.UnsatisfiedLinkE
rror