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

Won't let me subtotal a formula, How do I get aorund it

Status
Not open for further replies.

rmiller11

MIS
Jan 20, 2003
43
US
Here is what I am doing:

M00:
If DateDiff('m',CurrentDate,{POCMonths.PocMonth}) = 0
Then {@Sales} else 0

@Sales:
({POCMonths.FabRate}*{POCMonths.FabHr}) + ({POCMonths.MachRate}*{POCMonths.MachHr}) + {POCMonths.BOMcost} +
({POCMonths.EngRate}*{POCMonths.EngHr}) + {POCMonths.AdditionalProfit} + {POCMonths.MonthProfit}

Count0:
if {#count0} > 0 then Sum ({@M00}, {@Proj5}) / {#count0} else 0

I have a table with 16 jobs in it in which I am getting the sales value. the 16 jobs have the first 5 characters the same (@proj5), so I am combining them as an entity. the problem is the detail is repeated in all 16 lines so my math is 16 times what it should be when I am totalling. So I did a count and divided the total by the count and it works. The problem is I can't then get running totals or subtotals of the count0. It won't let me, it is not an option in the formula bar, the count0 is not present for selection. How can I get round this or how do I do it?

 
Crystal does things in a fixed order, which is why the results of formulas cannot be totalled as such. You will have to find a work-round, such as a duplicate formula that works at the sub-total level.

Note that you can use cut-and-paste to duplicate the contents of a formual. You cannot copy a formual as such, but in Crystal 8.5 you can copy-and-paste to another Crystal report, change the name and then copy it back. Madawc Williams
East Anglia
Great Britain
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top