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!

Crystal 9 Combining data from one field 1

Status
Not open for further replies.

VickieT

Technical User
Feb 18, 2004
35
US
Hello

I am doing a report that involves employer benefits and medical plan benefits and deductions.

The table I am working with is called {esyembdd.bended_code}. This contains the information on the benefit and deduction codes. Some of them are pretax benefits and deductions and some are not. They were listed that way in the database because the finance office needed them separated. My customer wants the report to combine the sets that are broken down this way as her billing doesn't separate them. To give you an example of this I have written out some of the benefits and deductions she is referring to and put its code from the database in parentheses:

Accident/Benefit Only (accpst) and Accident/Pretax/Kanawha (accpre)

Cancer/Benefit Only (canpst) and Cancer/Pretax/Kanawha (canpre)

Basic HMO (hmo) and Basic HMO pretax (hmo125)

My report is grouped by each plan as that is the name of the report: benefits and deductions by plan.
It gives the plan then each employee who has that plan then I have created formulas to list how much the employer pays as a benefit and how much the employee pays as a deduction.

I hope this is enough information but if not please let me know. Thanks so much in advance.

Vickie
 
Vickie,

If the 1st 3 characters indicate the plan, you can group on a formula:
--------------------
LEFT({code_field},3)
--------------------

Pretax or not pretax looks like a less uniform logic so consider creating a lookup table just for this or, if the number of cases is reasonable, create a
Select CASE statement.

hth,
- Ido

CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
Thanks Ido but the problem is that table and field contain other benefits that I don't want to use in this report so I have to select the ones she needs for her reporting purposes.

If I use
--------------------
LEFT({code_field},3)
--------------------
it will give me other plans as well. I tried the select statement but I'm not sure how to make it give me the other plans that don't need to be combined. Any ideas?
 
If the Plan Type logic is indeed just the 1st 3 characters, use a record selection formula ("IN" condition) that restricts the plans to those you need. It can also be driven by a multi-value parameter if the requested Plan Type list should be controlled by the user.

If the logic is more complex, we are back to the lookup table or CASE statement.

hth,
- Ido

CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top