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!

Need help displaying comments in details section 1

Status
Not open for further replies.

jpeters01

Technical User
Dec 5, 2007
109
US
Help please...I need to add comments which are stored like this:

{table.textline} {table.linenumber}
SLIDING SCALE HUMALOG 1
BEFORE MEALS 2
REQUIRES SIGNATURES 3

To medications in the details section of my report so that they display like this:

MEDICATIONS
COMMENTS

INSULIN LISPRO INJECTION
SLIDING SCALE HUMALOG BEFORE MEALS REQUIRES SIGNATURES

FLUTICASONE
COMMON PROTOCOL 250/50 RINSE MOUTH AFTER USE

Thanks!





 
Insert a group on medications, sort by {table.linenumber}and then create formulas like this:

//{@reset} to be placed in the group header:
whileprintingrecords;
stringvar x;
if not inrepeatedgroupheader then
x := "";

//{@accum} to be placed in the detail section and suppressed:
whileprintingrecords;
stringvar x := x + {table.textline}+ " ";

Then in the group footer use:
//{@display}:
whileprintingrecords;
stringvar x;
trim(x)

-LB
 
PS. Then suppress the detail section.

-LB
 
Thanks LB...because of the grouping and sorting already in place I was hoping to get the comments to display in the details section...is that possible?
 
No, because each portion of the line is coming from different detail records.

-LB
 
Makes sense now...that is why the meds duplicated when I added the textline fields to the details section. I will give it a try.
 
This worked :) but the textlines are displaying like this:

PRN INCREASED PAIN
RECOMMEND ADULT MAX
PLEASE DOCUMENT PAIN CONTROL

We need it to display like this:

PRN INCREASED PAIN RECOMMEND ADULT MAX PLEASE DOCUMENT PAIN CONTROL

Thank you!!!

 
Please explain whether the actual result you are showing is all one field with returns or whether these are multiple instances of the field.

-LB
 
PRN INCREASED PAIN (linenumber 1)
RECOMMEND ADULT MAX (linenumber 2)
PLEASE DOCUMENT PAIN CONTROL (linenumber 3)
 
Line number" is not a valid term in CR. Did you actually apply my formulas? Because what you are showing is what you began with. If you select click on the formula do all three "lines" appear in the same "box"?

-LB
 
Yes, when I click on @Display in GroupFooter2 this is what displays, in one field with returns. I added the @Reset formula to GroupHeader 2 and the @Accum formula to Details a. I grouped on RXNUMBER and in the Group Sort Expert it is sorting using {Table.Linenumber}
 
Should be recordsort, not groupsort. Anyway, change your display formula to this:

//{@display}:
whileprintingrecords;
stringvar x;
trim(replace(x,chr(13),""))

If this doesn't fix the issue, try chr(10) instead.

-LB
 
I tried both and they didn't work...I also changed it to recordsort.
 
Can I assume you stretched the formula to page width so that it has room to display in one line?

You could also try:
//{@display}:
whileprintingrecords;
stringvar x;
trim(replace(replace(x,chr(13),""),chr(10),""))

-LB

 
Woo-hoo :) That formula worked...bless you!!! (And yes I had previously stretched the formula.)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top