report 50400 "Transform Bobina" { DefaultLayout = RDLC; RDLCLayout = './src/report/design/Transform Bobina.rdl'; Caption = 'Transform Bobina'; dataset { dataitem("Bobina Transformacion Header"; "Bobina Transformacion Header") { DataItemTableView = sorting("No."); RequestFilterHeading = 'Ped. transform. Bobina'; RequestFilterFields = "No."; column(No_TransferHdr; "No.") { } column(ItemNo_BobinaTransformacionHeader; "Bobina Transformacion Header"."Item No.") { } column(Description_BobinaTransformacionHeader; "Bobina Transformacion Header".Description) { } column(Quantity_BobinaTransformacionHeader; "Bobina Transformacion Header".Quantity) { } dataitem(CopyLoop; Integer) { DataItemTableView = sorting(Number); DataItemLinkReference = "Bobina Transformacion Header"; dataitem(PageLoop; Integer) { DataItemTableView = sorting(Number) where(Number = const(1)); DataItemLinkReference = CopyLoop; column(CopyCaption; StrSubstNo(Text000, CopyText)) { } column(PostingDate_TransHdr; Format("Bobina Transformacion Header"."Posting Date", 0, 4)) { } column(PageCaption; StrSubstNo(Text002, '')) { } column(OutputNo; OutputNo) { } column(ShptMethodDesc; ShipmentMethod.Description) { } dataitem("Bobina Transformacion Line"; "Bobina Transformacion Line") { DataItemTableView = sorting("Document No.", "Line No.") where(Quantity = filter(<> 0)); DataItemLinkReference = "Bobina Transformacion Header"; DataItemLink = "Document No." = field("No."); column(LineNo_TransLine; "Line No.") { } } } trigger OnPreDataItem() begin NoOfLoops := Abs(NoOfCopies) + 1; CopyText := ''; SetRange(Number, 1, NoOfCopies); OutputNo := 1; end; trigger OnAfterGetRecord() begin if Number > 1 then begin CopyText := Text000; OutputNo += 1; end; end; } } } var ShipmentMethod: Record "Shipment Method"; DimSetEntry1: Record "Dimension Set Entry"; DimSetEntry2: Record "Dimension Set Entry"; FormatAddr: Codeunit "Format Address"; TransferFromAddr: Text[50]; TransferToAddr: Text[50]; NoOfCopies: Integer; NoOfLoops: Integer; CopyText: Text[30]; DimText: Text[120]; OldDimText: Text[75]; ShowInternalInfo: Boolean; Continue: Boolean; OutputNo: Integer; Text000: Label 'COPIA'; Text001: Label 'Ped. transfer. %1'; Text002: label 'Pág. %1'; }