Inconvenience when trying to obtain information in a report
isabtogumon
Member Posts: 50
I created a custom report in BC, information is obtained in the header, however I cannot obtain the records for the lines. I have already confirmed within Microsoft Report Builder that there is no visibility condition, so I think the problem is in the .al code but I have not been able to detect the error.
I share my code that I have developed:
Thanks in advance for the help
I share my code that I have developed:
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';
}
Thanks in advance for the help
0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.7K 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
- 324 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