Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using variables in a report
Message
From
28/11/2000 14:58:54
Cindy Winegarden
Duke University Medical Center
Durham, North Carolina, United States
 
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00446138
Message ID:
00446377
Views:
14
Becky,

This isn't really what you asked, but in general the easiest way to display data from more than one table is to SELECT the data the way you want it into one CURSOR and print your report from that. When I use this method I refer to the fields in the table/cursor as MyField only and not MyAlias.MyField. This way I can do any kind of special selection and use the same report format.

This method is tried and true, and eliminates a lot of report debugging up front.

Assuming your other table has something like company name and address, and your main table has sales, your SQL would look like:
SELECT Sales.*, Company.Name, Company.Address ;
    FROM Sales, Company ;
    WHERE Sales.SalesDate BETWEEN dBeginDate AND dEndDate ;
    AND Sales.CompanyID = Company.CompanyID ;
    ORDER BY Company.Name
If this isn't useful to you now, it might be later on.


>VFP 3.0
>
>Hello All,
>
>I have a report that I want to display a record in the body
>of the report, however, I need to display a record from a 2nd
>table for the header info.
>
>I would like to use variables to disply header info. but need help.
>Can anyone offer advice?
>
>Thanks and have a good day.
>
>Becky
Previous
Reply
Map
View

Click here to load this message in the networking platform