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

Repeat GH results without messing up order 2

Status
Not open for further replies.
Apr 2, 2007
27
CA
If my question seems to be pretty hard to answer, I can do this another way. I just wanted to see if this way is actually possible.

Information: I want to compare sales by date horizontally.

What I have: (I have GF2 small so I don't get the spaces in the report)

GH1 CENTRAL EAST $xxx.xx
GH2 CENTRAL EAST $xxx.xx
GF2
GH2 M1 CENT EAST $xxx.xx
GF2
GF1
GH1 CENTRAL WEST
GH2 CENTRAL WEST
GF2
GH2 M8 CENT WEST
GF2


What I would like:

CENTRAL EAST
CENTRAL EAST <--- These 2 would be whatever dates I set
M1 CENT EAST

CENTRAL EAST <--- These would be last years dates
M1 CENT EAST

CENTRAL WEST
CENTRAL WEST <--- These 2 would be whatever dates I set
M8 CENT WEST

CENTRAL WEST <--- These would be last years dates
M8 CENT WEST

Possible?

Thanks,
Steve

ps. How do you make quotes?
 
Add another group between your G1 and G2. Base it on the two date ranges. That gives you the output you're after.

And this is the right forum, as far as I can see.

[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 10 & 11.5 with Windows XP [yinyang]
 
Thanks for the reply. Is it possible to make another group based on the same field?

My GH2 is currently "Group Header #2: Target.Name".

I've tried adding a second group header to GH2 but that splits the records. Instead of getting:

GH2 CENTRAL EAST
GF2
GH2 M1 CENT EAST

I would get:

GH2a CENTRAL EAST
GH2b CENTRAL EAST
GF2
GH2a M1 CENT EAST
GH2b M1 CENT EAST

Thanks,
~Steve
 
Please try Madawc's suggestion. This should give you the desired results.

-LB
 
I'm sorry to be confused, I must not be as knowledged in the full potential of grouping.

Crystal won't let me enter another group [Target.Name]

I am assuming I am not changing a setting or perhaps I need to add a formula to this?
 
He is suggestion a group based on the date ranges you want to show. This will force the lower level groups to appear again.

-LB
 
Thanks for the replies, I do understand what Madawc is suggesting, however I am unsure how to properly do this.

~Steve
 
So exactly what do you mean by "whatever dates I choose" and "Last year's dates"? Certainly you can limit records to a date range, but then what do you want for last year's dates--the entire year? The calendar year? The fiscal year?

How are you limiting dates in your selection formula?

-LB
 
I have start date and end date parameters. I enter the dates I want the data to be in.

So I made the report (up to this point) where I can get results for the dates I enter. I know I can make formula's that can grab the dates of the same info of the same dates I choose minus a year by using this:

Date((Year({?Start Date})-1),(Month({?Start Date})),(Day({?Start Date})))

However if I do this I only know how to make the report through Columns (side by side comparison)

so by the dates I choose would be if I chose 10/1/09 to 3/1/10, I want the comparison to be 10/1/08 to 3/1/09. This is what I can do. What I cannot do is just get the fields to list over again without messing up the order.

Currently Group #2 is based on the table [Target.Name]. So with your suggestions wouldn't I want to enter that table again and put it inbetween Group #1 and Group #2? Or am I mistaken? When I try this, the OK button is Greyed out and will not let me enter another group based on the table [Target.Name]

~Steve
 
No. Create a formula like this:

if {table.date} in {?Start Date} to {?End Date} then
"Current Range" else
if {table.date} in Date(Year({?Start Date})-1,Month({?Start Date}),Day({?Start Date})) to
Date(Year({?End Date})-1,Month({?End Date}),Day({?End Date})) then "Previous Year Range"

Insert a group on this formula and then make it group #2. Please try this and then report back.

-LB
 
Sounds good, I will try this!

I prob won't get around to this until Monday. But I will keep you posted. Thanks for the feedback everyone.

~Steve
 
Got the chance to try our your formula LB. "Current Range" shows up without problems. However, Previous Year Range does not show up at all. I'll try playing around with it and see if I can get it to show.

Thanks,
~Steve
 
You have to have allowed the previous year records in your record selection formula.

-LB
 
THAT WAS IT!
Thank you Thank you Thank you!!

Looking at it now, it was just a simple formula.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top