I am running version 3.6 and the customer wants to print a statement, then all of the invoices that are on the statement, then the next statement, then all of the invoices that are on that statement, etc. So I added a little code to the PreSection of report 10072, HeaderFooter, Footer as follows:
REPORT.RUNMODAL(REPORT::"Sales Invoice",FALSE,FALSE,PostedInvHdrTmp);
where PostedInvHdrTmp is the Sales Invoice table (Table 112) that has been filtered to be only the invoices in question and the Sales Invoice report is report 10074. When I run the Statement report, I get the following error message:
The Sales Invoice report does not have a DataItem that uses the table (Table 112 Sales Invoice Header) specified in the function SetTableView.
As far as I can tell, the first DataItem in report 10074 is the Sales Invoice Header table. Apparantly, I cannot use SETTABLEVIEW in a report (it gives me the old 'You have specified an unknown variable...' message). Does anyone know what I am doing wrong? Or can I not run invoices from within Statements?
Thanks,
- Jim -
0