>>I've got a report I'm working on. It generates two views and uses one table directly. The report contains information from the two views and table. Only one of the views/table is appearing on my report. If I select view 1 right before running the report, that's what shows up on the report (view 2 and table info are missing). If I select the table instead, both views are missing. I'm not using the data environment in the report since the views are generated on the fly. The fields of the views and table are all referred to using:
>>
>>v_View1.Field1
>>v_View2.Field1
>>Table1.Field1
>>
>> Why wouldn't this work?
>
>Did you set relations between views and table?
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.