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

Variable Selection for month formula

Status
Not open for further replies.

Debug44

Technical User
Jan 12, 2004
19
US
I am using Crystal reports 10.0.5 accessing an SQL database.

My brain has turned to mush as I have not had to do this simple task in a few years...
The current report is set-up with a formula for each month in 2006 as a separate formula to only report that months quantity to be able to sum it up in the group below.
A sample of Jan-2006 formula is below.

if Month ({unit.monthEnd}) = 1 then ({unit.manned}/60)
unit.monthend is the last day of each month and unit.manned is the minutes the work center was manned (/60 to convert to hours)

I know I can create a variable formula to do this for ALL months in 2007 and 2007, yet i can not get it to work.
I appreciate any assistance...

(There are 8 of these fields that have a unique formula for each month 96 total formulas...and i really do not want to create all of them the hard way...yes, this is an old report that has been resurrected...)

I appreciate any assitance...and thanks in advance...

Bart


 
I dont fully understand...
if you were to group my year and then by month would you only return one line containing {unit.monthend} and {unit.manned} and I assuem other fields? Or would there be multiple records. If it is the former then you could group the report first by year then by month, then wouldnt the formula ({unit.manned}/60 placed in the details section give you what you need?
 
If you want a year, try Year(unit.monthEnd}). Are these formulas that you are using in Running Totals?

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top