web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

How to show field data from item ledger entry in SQL Server Report Builder

(0) ShareShare
ReportReport
Posted on by 5

I am designing a report in AL VS Code in report builder with Item and Item Ledger Entry Table takes data from item table is visible in business central but data of location code and remaining quantity from Item Leger Entry is not visible in front end 

Help me through out of it .

Screenshot-_2800_109_2900_.png

I have the same question (0)
  • Suggested answer
    Suresh Kulla Profile Picture
    50,243 Super User 2025 Season 2 on at

    Looks like you are displaying the data at the item level not at Ledger Entry level, share you .al report code.

  • Ragiv12 Profile Picture
    5 on at

    This is the whole al code of report

    report 50004 "E01 Location Wise Enventory"

    {

       ApplicationArea = All;

       Caption = 'E01 Location Wise Inventory';

       UsageCategory = ReportsAndAnalysis;

       DefaultLayout = RDLC;

       RDLCLayout = './location_Wise_Inventory.rdl';

       dataset

       {

           dataitem("Company Information"; "Company Information")

           {

               column(Company_Name; company_info.Name)

               {

               }

               column(Company_Aderess; company_info.Address)

               { }

               column(Company_Aderess_2; company_info."Address 2")

               { }

               column(Company_Logo; company_info.Picture)

               { }

               column(Company_PinCode; company_info."Post Code")

               { }

               column(Company_Country; company_info."Country/Region Code")

               { }

               column(Company_City; company_info.City)

               { }

               column(Comapny_State; company_info."State Inscription")

               { }

           }

           dataitem(Item; Item)

           {

               column(Item_Category_Code; "Item Category Code")

               {

               }

               column(No; "No.")

               {

               }

               column(Description; Description)

               {

               }

               column(Base_Unit_of_Measure; "Base Unit of Measure")

               {

               }

               column(Unit_Price; "Unit Price")

               {

               }

           }

           dataitem("Item Ledger Entry"; "Item Ledger Entry")

           {

               DataItemLinkReference = Item;

               DataItemLink = "Item No." = field("No.");

              column(Location_Code; "Location Code")

               {

               }

               column(Remaining_Quantity; "Remaining Quantity")

               {

               }

           }

          

       }

       requestpage

       {

           layout

           {

               area(content)

               {

                   group(groupname)

                   {

                   }

               }

           }

           actions

           {

               area(processing)

               {

               }

           }

       }

       trigger OnInitReport()

       var

           myInt: Integer;

       begin

           company_info.Get();

           company_info.CalcFields(Picture);

       end;

       var

           company_info: record "Company Information";

           item_detail: Record Item;

           item_ledger: Record "Item Ledger Entry";

    }

  • Suggested answer
    JAngle Profile Picture
    133 on at

    Do you have more than one location code? The main structure looks ok. I expect the issue is down to how the data is grouped in the report. Despite the data item links being joined the layout doesn’t work on that rule. AL presents the data to the layout as one bulk table. The layout then needs grouping to tie data together. This might help you:  archerpoint.com/.../

    You don’t need one for company information. You can use the variable and add values to columns (check a standard document report). You can then use the “Inventory” field on the item table for the “Remaining Qty.”. Just a case of whether you need the location as you might only have 1

  • Ragiv12 Profile Picture
    5 on at

    actually I don't know how to do I am beginner in business central.

  • Suggested answer
    Suresh Kulla Profile Picture
    50,243 Super User 2025 Season 2 on at

    As I mentioned the fields from the Item Table look ok but to get Item Ledger Entry, either you have to group or move all of your Item fields under the Item Ledger Entry because all those fields should be available on the Item Ledger Entry table, you can just use one dataItem for this Item Ledger Entry Table.

    Check report 5700 for reference

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,577

#2
YUN ZHU Profile Picture

YUN ZHU 888 Super User 2025 Season 2

#3
Jainam M. Kothari Profile Picture

Jainam M. Kothari 778 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans