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!

undesirable mirrored data

Status
Not open for further replies.
Jul 13, 2002
36
US
I am trying to create one report for prescriptions, whereby if a patient is ordered 4 medications, I can split the report into 4 equal parts and have the different RX's print in each corner. What I'm getting now is that the upper half prints the same medication twice as does the bottom half so I'm getting mirrored data from left to right. How do I correct this? My data looks like this:

{Patient_name} * {Patient_name}
{Medication_name} * {Medication_name}
{quantity} * {quantity}
{refills} * {refills}

I have equal links. Thanks. Technonurse-Spokane
 
Is this to say that you want a page to have four sections, and each section has a different medication, as in:

George W Bush Bill Clinton
Viagra Penicillin
100000 1000000
100 2000




Trent Lott Al Gore
Strychnine LSD
10000000 10000000000
0 30000

If so, consider using a multi column report.

A simple way is to use a mailing label report (selected when creating New). The Address (Avery 5161) will be close, and then you can tweak it.

Or alter an existing one as in:

Right click the details section and select Format Section->Format with Multiple Columns

Click the layout and select Printing Direction-Across then Down

Adjust settings until you get a favorable layout.

-k kai@informeddatadecisions.com
 
I would do it this way:

I will do it for a patient with a max of 4 meds....you can modify it to have more easily by adding more variables and sections

in the patient name Group header place the following formula

@Initialization (suppressed)
WhilePrintingRecords;
if not inrepeatedgroupheader then
( stringvar array patient := ("","","","");
stringvar array medicine := ("","","","");
stringvar array quantity := ("","","","");
stringvar array refills := ("","","","");
numbervar medcounter := 0;
);

There should be only one more group and that is by medicine type.
now in the detail section place the following
@assignment
WhilePrintingRecords;
stringvar array patient ;
stringvar array medicine ;
stringvar array quantity ;
stringvar array refills ;
numbervar medcounter ;

medcounter := medcounter + 1;
patient(medcounter) := {table.patient};
medicine(medcounter) := {table.medicine};
quantity(medcounter) := totext({table.quantity},0};
refills(medcounter) := totext({table.refills},0};

All groups, footers and detail sections are suppressed except for the Patient Footer

Make this into 2 sections

create 4 formulas similar to the following:

@Display Med1
WhilePrintingRecords;
stringvar array patient ;
stringvar array medicine ;
stringvar array quantity ;
stringvar array refills ;

"Patient: " + patient(1) + chr(13) + chr(10) +
"Medicine: " + medicine(1) + chr(13) + chr(10) +
"Quantity: " + quantity(1) + chr(13) + chr(10) +
"Refills: " + refills(1) ;

Place the first 2 in the first footer section and the second 2 in the next section....make sure the "Can grow" is enabled for each formula.
In the conditional suppress for each formula place the formula

Patient(1) = "" //(of course you would change the array
element with the formula)
In the second footer section enable the "suppress blank section).

This is a label type report as SV suggested...I just filled in details

Hope this helps


Jim Broadbent
 
The tip by Synapsevampire has worked well. Thank you all for your suggestions.

Technonurse Technonurse-Spokane
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top