Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do I use different tables using the same report?
Message
From
14/07/1998 16:10:36
 
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00117305
Message ID:
00117310
Views:
14
>I have question on reports. I just found an example in Kb Q188403. I didn’t realize I didn’t actually need to have tables in the data environment to work, but with some coding, the reports are linked and will work. This will help me a lot. I thought every time I wanted the same type of report with the same fields, but different tables, I had to create a new report for each different tables used. Does any have an example of code to change a report programmingly where there are a primary and secondary tables present? I would like to put variable fields in the primary and secondary report, and have the options to use different primary or secondary tables using the same report.
>
>Thanks,
>
>Jim McCourt

Usually, it's appropriate to have separate report form for each particular query, though you can make it flexible. The common way to provide flexible report is to print from cursor, i.e. your report fields are permanently bound to cursor fields, but cursor itself can be filled by different data, e.g. in one case you run:
Select Firstname as field1, LastName as field2 From Table1 Into Cursor curPrint
and in another case you run:
Select Dept as field1, Location as field2 From Table2 Into Cursor curPrint
Edward Pikman
Independent Consultant
Previous
Reply
Map
View

Click here to load this message in the networking platform