report 50153 "Shipping Label WO Invoice"
{
Caption = 'Shipping Label Without Posted Invoice';
DefaultRenderingLayout = "Shipping Label Without Invoice";
dataset
{
//getting data from Sales Header table instead of Sales Inv Header table
//if sales invoice has not been posted
dataitem("Sales Header"; "Sales Header")
{
RequestFilterFields = "No.", "Bill-to Customer No.";
column(CompanyName; CompInfo.Name) { }
column(Picture; CompInfo.Picture) { }
column(PhoneNo; CompInfo."Phone No.") { }
column(CustomerName; "Sales Header"."Bill-to Name") { }
column(OrderNo; "Sales Header"."No.") { }
column(YourReference; "Sales Header"."Your Reference") { }
column(ExtDocNo; "Sales Header"."External Document No.") { }
column(DocDate; "Sales Header"."Document Date") { }
dataitem("Sales Shipment Line"; "Sales Shipment Line")
{
DataItemLink = "Order No." = field("No.");
DataItemTableView = sorting("Order No.", "Line No.");
column(LineNo; "Line No.") { }
column(ItemNo; "No.") { }
column(ItemNo2; ItemNo2) { }
trigger OnPreDataItem()
begin
SetRange(Type, "Sales Shipment Line".Type::Item);
SetFilter("No.", '<>%1', '');
end;
trigger OnAfterGetRecord()
var
Item: Record Item;
begin
if Item.Get("No.") then
ItemNo2 := Item."No. 2"
else
ItemNo2 := '';
end;
}
}
}
requestpage
{
SaveValues = true;
}
rendering
{
layout("Shipping Label Without Invoice")
{
Type = RDLC;
LayoutFile = './Objects/ReportLayouts/ShippingLabelWithoutInvoice.rdl';
}
}
trigger OnPreReport()
begin
CompInfo.Get();
CompInfo.CalcFields(Picture);
end;
var
CompInfo: Record "Company Information";
ItemNo2: Code[20];
}