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

Crystal 11 - get LTD transactions when there is a transaction today

Status
Not open for further replies.

Martin McGovern

Technical User
Aug 12, 2016
1
US
Hi all!

I work for a pharmacy and our state board is asking for a daily report that shows all prescriptions dispensed today and, in addition, if the patient received their prescription today they also want to see all life to date transactions for that patient.

So, if nothing is dispensed today, the report is blank. If we do dispense to {dispense.patient} today, it needs to show all previous transactions (in some cases going back years).

The trigger is the dispense date {dispense.date}. However, any filter for {dispense.date} seems to limit my prescriptions {dispense.rx#} to only that date. Banging my head on the wall, so appreciate any ideas you may have.

Thank you!
Martin
 
The basic approach here is to use the same table twice, joined on patient ID. When you add the table the second time it will give it an alias by adding "_1" to the name.

You then use the first instance of the table to identify the patients with a transaction today (by referencing it in the Record Selection) , and the 2nd instance to return all transactions for those paients, ie put the fields from this table on the report.

Hope this help.

If you need furher assistance, provide table and field names and we can be a bit more specific.

Cheers
Pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top