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

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

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,135

#2
YUN ZHU Profile Picture

YUN ZHU 733 Super User 2025 Season 2

#3
Sumit Singh Profile Picture

Sumit Singh 612

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans