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

One to Many Field Display

Status
Not open for further replies.

haneen97

Programmer
Dec 10, 2002
280
US
Hi, running CR 8.5 against a SQL server database.

I have a patient table where each patient can have more than one insurance company. The companies are assigned a priority of 1, 2, 3…

I want to report the policy numbers for MEDICAID if the priority is 1 or 2 in field one; for MEDICARE if the priority is 1 or 2 in field two. I added the insurance table twice to my report with two separate names. One is for Medicare and the other for Medicaid. I put each policy number in a separate detail line but still only one number displays on both fields. I put this code under suppress for each policy number field.

Field one: Left (Medicaid_name, 8) <> “MEDICAID” and priority > 3.
Field two: Left (Medicare_name, 8) <> “MEDICARE” and priority > 3.

Please help!

Mo
 
You'll do better conveying requirements by posting example data and expected output.

If it's all in one table, you shouldn't need a self join.

Create 2 formulas to be used in the detail:

@medicaid
if Left (Medicaid_name, 8) = “MEDICAID” and {table.priority} < 3 then
{table.policynumber}

@medicare
@medicaid
if Left (Medicaid_name, 8) = “MEDICARE” and {table.priority} < 3 then
{table.policynumber}

Not sure if this is what you want, I have no table design nor example data to go on, and your formula makes no sense as your referencing "and priority > 3" which is neither a formula nor a field.

-k
 
Hi this is a sample data. I hope it displays like I intended to. I tried your approach above. Still displayed one policy number.

Patient Table: Patient Name
Smith


Insurance Table:Compnay Policy Number
Medicaid yyyyy
Medicare xxxxx


Patient Insurance Table:
Patient Name Insurance Priority Policy Num Smith Medicaid 1 yyyyy
Smith Medicare 2 xxxxx

Expected report format Patient Name Smith
Medicaid Policy Number yyyyy
Medicare Policy Number xxxxx


Mo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top