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!

Appt book report

Status
Not open for further replies.

jello212

Technical User
Jun 19, 2007
29
US
I'm working on a report for a doctor's office and they'd like a printout of the schedule to view at a glance.

Desired Output is:

Dr 1 Dr 2 Dr 3 Dr 4
8:00 D Smith M Jordan J Worthy
K Smith
8:15 A Jamison V Carter R Felton
R Williams
S May
8:30 etc


The data is stored as:
appt_dttm Dr_id pat_id appt_id
7/1/07 8:00 1 D_Smith 1
7/1/07 8:00 2 M_Jordan 2
7/1/07 8:00 1 K_Smith 3
7/1/07 8:00 3 J_Worthy 4
etc.

What I'm currently getting:
Dr 1 Dr 2 Dr 3 Dr 4
8:00 D_Smith
M_Jordan
J_Worthy
K_Smith
8:15 A_Jamison
V_Carter
R_Felton
R_Williams
S_May
etc.
---------------------------------------
Any ideas how to get the appointments onto the same line? I know I can group on the appt time and use a Max/min to get the appointments on the same line. But, that won't work if there are more than 2 appts for the same time for the same doctor.

Thanks.
 
It would depend on how the data is stored. You can add the same table (dataset) several times, the 2nd and later occurences coming as an Alias.



[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
You could use NthLargest (1,2,3, etc., to the maximum number of appointments there could be per time) instead of max and min. You could also do this in an inserted crosstab using NthLargest, instead of using conditional formulas.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top