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!

Multiple "Comments"

Status
Not open for further replies.

JonathanNYC

IS-IT--Management
Mar 29, 2003
111
US
I generate reports from Operating Room intraoperative documentation. I have a table "Opmeds" that contains the names and comments associated with various medications used during the case. I have a table "Equipment" that contains equipment and comments associated with certain equipment used during the case. The Blood Bank wants to see if Heparin (medication) was used and comments with that and if a "Cell Saver" (equipment) was used and comments associated with that equipment.

I am able to extract (and report on) only heparin and cell saver BUT I am getting comments on EVERY medication and EVERY piece of equipment used. I need only the comments pertaining to Heparin and Cell Saver.

The comments all reside in a table called "Comments".

I suspect this is a conditional or IF statement or maybe even a sub-report. But, i am not yet seasoned enough to figure out a statement.

Any suggestions ?






 
Several solutions are possible, depending in part on which version of Crystal you have. I only know version 8.5.

My way would be as follows:

a) Create a formula field to display on your report, in place of the 'comments' data. Something like Show-Relevant

b) Create two more formula fields, testing for a comment of Heparin and a comment of Cell Saver. Call them Com-Hep and Com-Cell, say. Make them 'boolians' - rather than an 'if' and 'then', just have the test.

c) Test within Show-Relevant for Com-Hep=true and Com-Cell=true. Do this as if.. then.. else if.. etc, and display suitable text for both true, just one or neither.

I hope this helps. Madawc Williams
East Anglia
Great Britain
 
It would help to know a little more. You mention that comments fields are within each of your two tables and also that comments are in their own separate table, which is a little confusing. Is there a fourth table with the CaseID field? How are your tables linked?

It would also help to see a layout of what your report looks like now, and how you would like it to be.

-LB
 
You might include the database used and the version of Crystal to help define your enviroment.

You should be able to join the comments table to the medication and equipment table based on a key field, I'm guessing that you've omitted a great deal here, such as the equivalent of a Patient/Case table, which should provide for the join.

Another means for limiting rows in a comments table is to use a SQL Expression to return those fields which contain the desired text, here's an example using SQL Server that searches a first name field and returns either nada or the first name for those that have John as part of the text:

select case charindex('John', chvfirstname)
when 0 then 'nada'
Else chvfirstname
end
from atsperss

-k
 
You have a linking problem with your tables....What is the link between the comments table and that of the medicine...is there one?

Fix that and your report probably will work fine Jim Broadbent
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top