Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using more than one select statements
Message
From
25/03/2002 18:44:32
Henry Ravichander
RC Management Systems Inc.
Saskatchewan, Canada
 
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00637030
Message ID:
00637045
Views:
14
>First, I don't see the third table in your example. Second, what is relationship between those tables (2 or 3)? Can you show an example how do you want you data to look on report?
>
Hi Sergey:

I currently have written code for 2 tables only and will be including the 3rd.
select a.*, b.PresRef, b.MedName, b.OrderDate, b.PhysRef;
	from Physicals a, Prescriptions b;
	into cursor ViewPhysicalsReport nofilter;
	where a.Healthnum = mRepHealthNum .and.;
		a.Date = mPhysicalsDate .and.;
		b.PhysRef = a.PhysRef;
	order by a.PatientNam, a.HealthNum, a.PhysRef, b.MedName
Desired Report:
REPORT HEADING
Report Date:
Doctor:
Patient Name:                              Date of Physicals:
_____________________________________________________________

BP:     HR:   etc........

General Appearance:
Head and Neck: 
......
...... (all from physicals table)

Prescriptions:  (list all medications prescribed)

Labtests:  (list all labtests ordered) (this is the 3rd table)

Diagnosis: (from Physicals table)
Management: (from Physicals table)
Progress: (from Physicals table)
____________________________________________________________
Page number
Relationship: All tables are related by date and PhysRef.

Thanks.

Ravi
- Ravi

True greatness consists in being great in little things.
- Charles Simmons
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform