Printing Invoices from within the Statement

brewer
Member Posts: 12
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 -
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
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions