Skip to main content

Notifications

Community site session details

Community site session details

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

Creating another row in Business Central Report Based on Condition

(0) ShareShare
ReportReport
Posted on by 25

Hi, we are trying to automate our Packing List report to be used by our Warehouse for shipments. the report is based on a sales line. However, one of the condition is that for 1 item (lets say 1500 cases), if the cases per pallet is 500, that 1 item should divide into 3 pallets. Meaning in the report 3 lines on my report should show like below. This then will repeat to other items in the sales lines of the report until the whole shipment is finished with continuous Pallet No. . We have table where the no. of cases per pallets for each of our registered Item Nos. are defined. 

Item A= 1500 Cases, cases per pallet 500

Item B= 1000 Cases, cases per pallet 200

Item No.   Qty Pallet No.
Item A 500 1
Item A 500 2
Item A 500 3
Item B 200 4
Item B 200 5
Item B 200 6
Item B 200 7
Item B 200 8

Please Help me! Thank you

  • Suggested answer
    Inge M. Bruvik Profile Picture
    1,021 Moderator on at
    RE: Creating another row in Business Central Report Based on Condition

    Hi Hot Potato ,

    Thank you for providing valuable information to help you further.

    The best approach in my eyes would be to create a sales line buffer table that you use as the dataitem for your report.

    That table should consist of at least the PK from the Sales Line table and the result for the pallet calculation as you showed it in your first post.

    Then you can use that table to generate your report.

    The table can possible be temporary unless you want to store the result of the pallet calculation for further use or reference,

    I hope this helps you further.

  • Hot Potato Profile Picture
    25 on at
    RE: Creating another row in Business Central Report Based on Condition

    Thank you very much for your time to check my case, however we don't utilize warehouse function now in Business Central ..we have an independent software for our warehouse integrated to Business Central. I will really appreciate if I can see ideas how it is done in other companies. Thanks!

  • Hot Potato Profile Picture
    25 on at
    RE: Creating another row in Business Central Report Based on Condition

    The Unit of Measure for our sales lines are in Cases, and we don't have any table to define the pallet no. Of each sales lines and sales orders. We were thinking if this can be populated as a calculated field as the only data that we have in BC right now is a table that defines the no of cases per pallet, palletization type and transport method code.I haven't done yet the codes for it, but I was thinking to use for loop statement or while do... To populate a sequence no. which can serve as pallet no. In our warehouse. The whole report was done, only the column for pallet no. column is to be created. The idea is that the user will choose the palletization type in the sales header along with the Transport method, then a report from BC should indicate and compute the pallet no. for each of the sales line. Our warehouse uses another software integrated to Business Central hence we do not use Warehouse Function, we only  have Sales Order data to create this document. Thank you!

  • Suggested answer
    Inge M. Bruvik Profile Picture
    1,021 Moderator on at
    RE: Creating another row in Business Central Report Based on Condition

    Have you defined the pallets as Item unit of measure so you can use that info to find out how many pallets you need?

    Have you started writing a report at all, if so maybe you should share the code you have written so far?

  • Suggested answer
    JAngle Profile Picture
    83 on at
    RE: Creating another row in Business Central Report Based on Condition

    Seems like you would need a temporary table for the sales line or a custom table added to the report producing the list. You can then add to the temporary table based on your criteria and display that output in your report layout. Steven Renders  might be able to advise you on the development approach further.

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,099 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,866 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans