Export to Excel - Business central 365 Wave 2

rnjbng
Member Posts: 82
Hi folks -
I have a processing only report with 2 data items and a procedure Makedatabody. I get the errors that Sales shipment header and Sales shipment line does not exist. Can anyone please let me know how do i refer to a field in 365 BC. Many..Many thanks for your help.
Sales shipment header
Sales Shipment Line
procedure MakeDataBody();
begin
ExcelBuf.NewRow;
IF i = 1 THEN BEGIN
ExcelBuf.AddColumn("sales shipment line"."Document No.", FALSE, '', TRUE, FALSE, FALSE, '', ExcelBuf."Cell Type"::Text);
ExcelBuf.AddColumn("Sales Shipment Line"."Document Date", FALSE, '', FALSE, FALSE, FALSE, '', ExcelBuf."Cell Type"::Date);
END ELSE BEGIN
ExcelBuf.AddColumn('', FALSE, '', FALSE, FALSE, FALSE, '', ExcelBuf."Cell Type"::Text);
ExcelBuf.AddColumn('', FALSE, '', FALSE, FALSE, FALSE, '', ExcelBuf."Cell Type"::Text);
END;
ExcelBuf.AddColumn("sales shipment header"."Shipment Method Code", FALSE, '', FALSE, FALSE, FALSE, '', ExcelBuf."Cell Type"::Text);
ExcelBuf.AddColumn("Sales Shipment Line"."Order No.", FALSE, '', TRUE, FALSE, FALSE, '[RED]', ExcelBuf."Cell Type"::Number);
ExcelBuf.AddColumn(FORMAT("Sales Shipment Line".Type), FALSE, '', FALSE, FALSE, FALSE, '', ExcelBuf."Cell Type"::Text);
ExcelBuf.AddColumn("Sales Shipment Line"."No.", FALSE, '', FALSE, FALSE, FALSE, '', ExcelBuf."Cell Type"::Text);
ExcelBuf.AddColumn("Sales Shipment Line".Description, FALSE, '', FALSE, FALSE, FALSE, '', ExcelBuf."Cell Type"::Text);
ExcelBuf.AddColumn("Sales Shipment Line"."Shortcut Dimension 2 Code", FALSE, '', FALSE, FALSE, FALSE, '', ExcelBuf."Cell Type"::Text);
ExcelBuf.AddColumn("Sales Shipment Header"."Location Code", FALSE, '', FALSE, FALSE, FALSE, '', ExcelBuf."Cell Type"::Text);
ExcelBuf.AddColumn("Sales Shipment Line".Quantity, FALSE, '', FALSE, FALSE, FALSE, '#,##0', ExcelBuf."Cell Type"::Number);
ExcelBuf.AddColumn("Unit Price", FALSE, '', FALSE, FALSE, FALSE, '#,##0.00', ExcelBuf."Cell Type"::Number);
ERROR
The name '"Sales Shipment Header"' does not exist in the current context
The name '"Sales Shipment Line"' does not exist in the current context
Thanks
RJ.
I have a processing only report with 2 data items and a procedure Makedatabody. I get the errors that Sales shipment header and Sales shipment line does not exist. Can anyone please let me know how do i refer to a field in 365 BC. Many..Many thanks for your help.
Sales shipment header
Sales Shipment Line
procedure MakeDataBody();
begin
ExcelBuf.NewRow;
IF i = 1 THEN BEGIN
ExcelBuf.AddColumn("sales shipment line"."Document No.", FALSE, '', TRUE, FALSE, FALSE, '', ExcelBuf."Cell Type"::Text);
ExcelBuf.AddColumn("Sales Shipment Line"."Document Date", FALSE, '', FALSE, FALSE, FALSE, '', ExcelBuf."Cell Type"::Date);
END ELSE BEGIN
ExcelBuf.AddColumn('', FALSE, '', FALSE, FALSE, FALSE, '', ExcelBuf."Cell Type"::Text);
ExcelBuf.AddColumn('', FALSE, '', FALSE, FALSE, FALSE, '', ExcelBuf."Cell Type"::Text);
END;
ExcelBuf.AddColumn("sales shipment header"."Shipment Method Code", FALSE, '', FALSE, FALSE, FALSE, '', ExcelBuf."Cell Type"::Text);
ExcelBuf.AddColumn("Sales Shipment Line"."Order No.", FALSE, '', TRUE, FALSE, FALSE, '[RED]', ExcelBuf."Cell Type"::Number);
ExcelBuf.AddColumn(FORMAT("Sales Shipment Line".Type), FALSE, '', FALSE, FALSE, FALSE, '', ExcelBuf."Cell Type"::Text);
ExcelBuf.AddColumn("Sales Shipment Line"."No.", FALSE, '', FALSE, FALSE, FALSE, '', ExcelBuf."Cell Type"::Text);
ExcelBuf.AddColumn("Sales Shipment Line".Description, FALSE, '', FALSE, FALSE, FALSE, '', ExcelBuf."Cell Type"::Text);
ExcelBuf.AddColumn("Sales Shipment Line"."Shortcut Dimension 2 Code", FALSE, '', FALSE, FALSE, FALSE, '', ExcelBuf."Cell Type"::Text);
ExcelBuf.AddColumn("Sales Shipment Header"."Location Code", FALSE, '', FALSE, FALSE, FALSE, '', ExcelBuf."Cell Type"::Text);
ExcelBuf.AddColumn("Sales Shipment Line".Quantity, FALSE, '', FALSE, FALSE, FALSE, '#,##0', ExcelBuf."Cell Type"::Number);
ExcelBuf.AddColumn("Unit Price", FALSE, '', FALSE, FALSE, FALSE, '#,##0.00', ExcelBuf."Cell Type"::Number);
ERROR
The name '"Sales Shipment Header"' does not exist in the current context
The name '"Sales Shipment Line"' does not exist in the current context
Thanks
RJ.
0
Comments
-
I figured this out folks, please ignore my post.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