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

Group by Quarterly

Status
Not open for further replies.

manlia

Technical User
Jan 19, 2004
12
US
I'm not sure if this can be accomplished within Crystal report:
The report need to show the calculation for each quarter based on the user defined time periods ("From" and "To" date parameters). The "From" and "To" date parameters are ranged among 3 different date fields. If the parameter is put from 01/01/2003 to 06/30/2003, the report should show all the calculations broken down by each Quarter. And, the Q1 and Q2 should be shown for each group.

Here is defined in the record selection formula:
{table.datefield1} in {FromDate?} to {ToDate} and
{table.datefield2} in {FromDate?} to {ToDate} and
{table.datefield3} in {FromDate?} to {ToDate} and

I tried to do the group by {FromDate} parameter. But, it seems that Crystal report doesn't allow it. When I click on the "Insert group" option, I don't see any parameters on the list.
Then, I tried to put the parameter {FromDate} inside a formula and grouped off that formula, but I can't see it either on the list. Is this a limitation?

Any help is greatly appreciated.
Thanks!
Manlia
 
You can't group on a parameter, you have to group on a data field.

You will have to decide which of the three date fields you want to group on (or all three if makes sense). Quarterly is one of the grouping choices for dates.

Lisa
 
Thanks lyanch for the feedback. If it's only based on 1 date, your solution will be good. But, the client wants to be able to reports of those 3 dates for the quarter grouping. This is a kind of awkward report I think.
The Q1 and Q2 will be based on the "FromDate" parameter field that the user put in.
The format is kind like a cross tab:


Q1 2003 Q2 2003
================== ============
Locations | Totals Totals
------------------ ------------
Loc 1 | 15 16
Loc 2 | 13 19
Loc 3 | 40 35
Loc 4 | 12 20
...
 
So what if you have a record that has {table.datefield1} in one quarter and {table.datefield2} in another quarter and {table.datefield3} in still another quarter? what "quarter" does the record go in?

Lisa
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top