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

New Line

Status
Not open for further replies.

sjc1956

Technical User
Jan 14, 2004
19
I'm needing to start a new line after each colon that comes after the words in all caps in this group of notes. I use CR 10. Thanks.

Rec Therapy Intervention: SUBJECTIVE: OBJECTIVE: Activity: Special music Lunch bunch Time: 60 min LEVEL OF PARTICIPATION/SOCIALIZATION: Appropriate Responds to conversation FIM Score: 7 Pt. Transferred 4 PLAN: continue plan of care
 
Can you post wha tthe expected output of the formula should be? Should it include all the colons?

~Brian
 
Rec Therapy Intervention:
SUBJECTIVE: (TEXT)if any
OBJECTIVE: (TEXT)
LEVEL OF PARTICIPATION/SOCIALIZATION: (TEXT)
FIM Score: (#)
Pt. Transferred 4 PLAN: (TEXT)
 
This formula should get you pretty close:
Code:
stringvar input := "Rec Therapy Intervention: SUBJECTIVE: OBJECTIVE: Activity: Special music Lunch bunch Time: 60 min: LEVEL OF PARTICIPATION/SOCIALIZATION: Appropriate Responds to conversation FIM Score: 7 Pt. Transferred 4 PLAN: continue plan of care";
stringvar output := "";
stringvar array t_array := split(input,": ");
numbervar i := 0;

for i := 1 to ubound(t_array) do
(
        if t_array[i] = UCASE(t_array[i]) then
            output := output & chr(13);
        output := output & t_array[i] & ": ";
);
output

Also, go into File, Report Options, and make sure that the proprty "Database Server is Case Insensitive" is not selected. Yo uwill need to do that in order for this formula to work. Just make sure that it doesn't mess anything else up in your report.

~Brian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top