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

Sum Year To Date Amt

Status
Not open for further replies.

ngcn

MIS
Apr 29, 2002
33
MY
Hi,

Does anyone knows how to create a formula to calculate Sum of an Amt field whereby if current month is > Sep, sum from current year's Sep to current month, if current month is <= Sep, sum amt from last year's Sep to this year's Sep. The main point is sum 12 mths but must start from September.

Please help me !

Thanks.

best regards,
ngcn
 
This sounds like the formula for the US Federal year, which runs from October 1 to September 30. The answer is to group your report on the following formula:

Year ({Datefield} + 92)

This will group your dates on a Sep - Sep year. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
kenhamady,

It is not exactly the same, its a Financial year from 1st Sep to 31 Aug (12 months). I want to calculate the Year To Date Total for the total amt of Qty * Rate.

If current month is > Sep, sum current year's Sep until current month, if current month is <= Sep, sum amt from last year's Sep until this year's Sep.

I think I have posted to the wrong forum, actually I want to ask on how to write sql query for CR. Can u help me ??

beat regards,
ngcn
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top