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

Months and Quarters 1

Status
Not open for further replies.

Bennie47250

Programmer
Nov 8, 2001
515
US
I’m in the design stage of a new report. I have been asked to show expenses by month and then subtotal the months based on the quarters. The desired look is shown below. I fairly certain I can get the months to work OK by grouping the report on month. How can I get the months to subtotal into Quarters?

Thanks
Bennie



JAN XXXXX
FEB XXXXX
MAR XXXXX

1stQTR XXXXX

APR XXXXX
MAY XXXXX
JUN XXXXX

2ndQTR XXXXX (Only months in 2nd qtr, not YTD)
 
In the details section, insert a formula field that tests the month and assigns a quarter. Then group by quarter as well as by month.

Let me know if you have any questions. Software Support for Macola, Crystal Reports and Goldmine
dgillz@juno.com
 
dgillz,

Thanks for the quick reply but I’m not sure what you are suggesting here. I think you are suggesting that I have a formula like this:

Formula name: Assign Quarter

If month = 1 then 1st Qtr
Else if month = 2 then 1st Qtr
Else if month = 3 then 1st Qtr
Else if month = 4 then 2nd Qtr
Else if month = 5 then 2nd Qtr
Else if month = 6 then 2nd Qtr
So on and so on

Then group on this formula

Did I understand you correctly?

Thanks again.
 
That is correct, but a simpler approach would be:

If month < 4 then '1st&quot; else
If month < 7 then '2nd' else
If month < 10 then 3rd' else '4th' Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
Yes, Ken nailed it, as usual. Software Support for Macola, Crystal Reports and Goldmine
dgillz@juno.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top