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!

Help with formula that displays horizontally 1

Status
Not open for further replies.

jpeters01

Technical User
Dec 5, 2007
109
US
We use this formula to display allergies horizontally. How can I get it to NOT display allergies that have an inactive date? For example, allergies are:
Aspirin (inactive date is null)
Penicillin (inactive date is null)
No allergy information (Inactivate date of 10/1/10)

Currently it displays like this:
ALLERGIES: Aspirin, Penicillin, No allergies information.

I need it to display like this:
ALLERGIES: Aspirin, Penicillin

This is the formula

whileprintingrecords;

Global stringVar array ResultsArray:=GroupName ({CPI_ALLERGY.ALLERGEN_DESCRIPTION});
numberVar NumberofResults:=ubound(ResultsArray);
stringvar FinalList;
numberVar Position;

for Position := 1 to NumberofResults do
(FinalList := FinalList + ResultsArray[Position] + ", ");

left(FinalList,length(FinalList) - 2);

Thank you much!
 
Add a Group Selection formula to that group:

IsNull({CPI_ALLERGY.InactiveDateField}


This should screen out those allergies with an Inactive Date
before the Array is formed.



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top