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

Crystal 11_Formula issue_summary fields?

Status
Not open for further replies.

Kilantro

Technical User
May 15, 2011
1
AU
Hi,

I am using Crystal 11

Would really appreciate any input that anyone would have on the following issue - its doing my head in...


I have 4 seperate fields (representing type of medical tests)

UDF2.Test1
UDF2.Test2
UDF2.Test3
UDF2.Test4

all with data values 1,2,3,4,5 (representing the test result)

I need them displayed in a report so that the 4 fields are displayed in 1 field (Tests Done), and then the lookups (Test Result) are used to display in another field.
Eg.

Patient ID Test Done Test Result
123 Test 1 2
123 Test 4 1
456 Test 1 4
789 Test 2 1
789 Test 3 1

I can't get the the 2 summary fields (Test Done and Test results) to come out how I want them!


Thanks,
K
 
Use a command as your datasource and set it up like this:

select UDF2.Test1 as testtype, UDF2.patientID, UDF2.TestResult
From UDF2
where <selection criteria here>
union all
select UDF2.Test2, UDF2.patientID, UDF2.TestResult
From UDF2
where <selection criteria here>
union all
select UDF2.Test3, UDF2.patientID, UDF2.TestResult
From UDF2
where <selection criteria here>
union all
select UDF2.Test4, UDF2.patientID, UDF2.TestResult
From UDF2
where <selection criteria here>

This will merge the four test fields into one field "testtype".

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top