Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
3 views, only one will print at a time
Message
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00132564
Message ID:
00132620
Views:
16
> No. There is a parent/child type relationship between the views, but they aren't defined in the database. "View 1" is an invoice, "View 2" is the invoice lines, and the table is the Company profile (for things like tax rate, company name,etc.)
>
>Here's (sort of) what I do:
>
>GenCursor Method
>----
>SELECT * FROM Invoice WHERE Invoice.number == ?THIS.InvoiceNum INTO CURSOR v_Invoice
>SELECT * FROM InvoiceLine WHERE InvoiceLine.number == ?THIS.InvoiceNum INTO CURSOR v_InvoiceLine
>-----
>
>Print Method
>----
>THIS.OpenFiles() && Make sure all necessary tables are open
>THIS.GenCursor()
>REPORT FORM Invoice TO PRINTER NOCONSOLE
>----
>
>
>In the report I have fields like:
>(the ones in [] brackets are my "links" to my cursors/table)
>
>Header section:
>[Company.Name] Invoice: [v_Invoice.number]
>
>Data section: (can't remember the correct name for this part)
>
>Description Qty Price
>v_InvoiceLine.Descr v_InvoiceLine.Qty v_InvoiceLine.Price
>
>
>I don't have any tables/views in the "Data Environment" section of the report.

Paul, these look like CURSORS, not views (Views are specifically defined in the database). You will need to relate the cursors to each other, which will involve indexes, or (better in my opinion) do a single cursor which has all the information. It isn't important that you will have duplicate fields for invoice number and other 'header' information, because this is a temporary file.

Group on the Invoice number, and use the line number items in your detail section.

HTH
Barbara
Barbara Paltiel, Paltiel Inc.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform