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

Sort by Period

Status
Not open for further replies.

AntonioPerera

Vendor
Jan 29, 2006
91
AU
I have a formula which sorts transactions based on criteria I have specified in a formula, that formula is the group # 1 header.

An example of my formulas there is as follows :
if {?YEAR YYYY} = "2008" and
({@dept} in ["100"])
then
01
else
if {?YEAR YYYY} = "2008" and
({@dept} in ["200"])
then
02
etc.

The values for each type of record is stored in a separate field.
E.g :
Values_Period 1
Values_Period 2
Values_Period 3
Values_Period 4
Values_Period 5
Values_Period 6
Values_Period 7
Values_Period 8
Values_Period 9
Values_Period 10
Values_Period 11
Values_Period 12

Now into my formula I need to specify that all the transactions for Department 100 from January to June need to go to be assigned the code 20 and all the July to Dec transactions need to be assigned to the code 21 as per my example above.


My problem is that I do not have a single field which contains the Period, instead I have a separate field for each Period.

How would then be the best way to achieve my desired results ?

 
Create a formula field that collects the value from the correct field. The field you showed almost does it, use that or a variant.

You can sort by Formula Fields, provided they don't make use of summary values, values from more than one detail line.

It helps to give your Crystal version - 8, 8.5, 9, 10, 11 or whatever. Methods sometimes change between versions, and higher versions have extra options. In this case, it probably makes no difference.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
I can't follow this. What are you grouping on? The formula you are showing? Why can't you simply group on year and then department? I also don't see how your formula (or the date/dept fields) then connects to the values_period fields. Can you instead try explaining a little more what you are trying to do?

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top