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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

GroupName as a case statement condition 1

Status
Not open for further replies.

Tech2377

Programmer
Nov 13, 2007
81
I am attempting the following code in Crystal Reports XI
I get a boolean return value.

local CurrencyVar Budget;

Select GroupName ({qry_Admin_Financials.PostingDate}, "annually")
Case '2005':
Budget = 38000000
Case "2006":
Budget = 42000000
Case "2007":
Budget = 50000000
 
What exactly are you trying to do? If you are trying to set a budget figure per group, then try this:

numbervar Budget := (
select year({qry_Admin_Financials.PostingDate})
case 2005 : 38000000
Case 2006: 42000000
Case 2007: 50000000
);
Budget

You could approach it the way you did initially, but you need to use ":=" instead of "=".

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top