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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

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

fix on NAVISION 2018 C/AL CODE .

(0) ShareShare
ReportReport
Posted on by 70

I need to add ID Field in Report , which is based upon the existing Inventory Label Report.  Need to extract the same ID field from the Warehouse Entry table. The idea being that they can post there output into a container, print label and have the container ID on the report as a barcode. 

I have the same question (0)
  • Suggested answer
    Amit Baru Profile Picture
    3,037 on at

    Hi,

    Pls share you code. I will check and give you better solution.

    Regards

    Amit Sharma

  • Yathish JR Profile Picture
    70 on at

    OnInitReport()

    OnPreReport()

    gErrorContext.rdSetErrorContext( lcInventoryLabelReport );

    BINDSUBSCRIPTION( gErrorContext );

    OnPostReport()

    Label Parameters - OnPreDataItem()

    IF(

     ( GETFILTER( GUID ) = '' )

    )THEN BEGIN

     lcduInventoryLabelPrinting.jfGetPrintingData( grecLabelParametersTEMP );

     IF(

       ( NOT grecLabelParametersTEMP.ISEMPTY )

     )THEN BEGIN

       CurrReport.BREAK;

     END ELSE BEGIN

       ERROR( lctxtNothingToPrint );

     END;

    END;

    Label Parameters - OnAfterGetRecord()

    grecLabelParametersTEMP := "Label Parameters";

    grecLabelParametersTEMP.INSERT;

    Label Parameters - OnPostDataItem()

    LabelParametersBuffer - OnPreDataItem()

    IF(

     ( gintNumberOfCopies < 1 )

    )THEN BEGIN

     gintNumberOfCopies := 1;

    END;

    SETRANGE( Number, 0, ( grecLabelParametersTEMP.COUNT * gintNumberOfCopies ) - 1 );

    gInventorySetup.GET;

    LabelParametersBuffer - OnAfterGetRecord()

    IF(

     ( ( Number MOD gintNumberOfCopies ) = 0 )

    )THEN BEGIN

     IF(

       ( Number = 1 )

     )THEN BEGIN

       grecLabelParametersTEMP.FIND('-');

     END ELSE BEGIN

       grecLabelParametersTEMP.NEXT;

     END;

     QuantityBarCode := BarCodeMgmt.To_128B(FORMAT(grecLabelParametersTEMP.Quantity));

     grecLabelParametersTEMP.CALCFIELDS( "Item Description" );  

     CLEAR( gtxtExpirationDate );

     IF(

       ( grecLabelParametersTEMP."Expiry Date" <> 0D )

     )THEN BEGIN

       gtxtExpirationDate := FORMAT( grecLabelParametersTEMP."Expiry Date" );

     END;

     CLEAR(gtxtSerialNoCaption);

     CLEAR(gtxtCatchWeightCaption);

     IF grecLabelParametersTEMP."Serial No." <> '' THEN

       gtxtSerialNoCaption := lblSerialNo;

     IF grecLabelParametersTEMP."Net Weight" <> 0 THEN

       gtxtCatchWeightCaption := lblCatchWeight;

     CLEAR( gBarCode128 );

     CLEAR( gBarCode128HumanReadable );

     gBarCode128 := lBarCodeTypeManagement.rdConvertLabelParamsToBarCode( '', grecLabelParametersTEMP, gBarCode128HumanReadable );

    END;

    LabelParametersBuffer - OnPostDataItem()

    Warehouse Entry - OnPreDataItem()

    Warehouse Entry - OnAfterGetRecord()

    Warehouse Entry - OnPostDataItem()


    MY REQUIREMENT IS TO Need to add  ID Field in Report which is based upon the existing Inventory Label Report.  Need to extract the ID  field from the Warehouse Entry  table. The idea being that they can post there output into a container, print label and have the ID on the report as a barcode.

  • Yathish JR Profile Picture
    70 on at

    any answers ?

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,091 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,032 Super User 2026 Season 1

#3
Dhiren Nagar Profile Picture

Dhiren Nagar 946 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans