Barcode Field in Report

fahdfahd Member Posts: 226
Dear Experts,
i Want the barcode filed in the Report 205 ORDER CONFIRMATION. it is basically accesing data from Table 37 (SALES LINE).

so in that report i can't see the barcode field. I need it to be displayed when we run that report.

Can that be possible if it is possible kindly let me know how can i do that

Thanks in Advance ! :)

Regards,
Fahd.

Comments

  • alok_kulalok_kul Member Posts: 8
    change the fond type of that field.
    use fond 'free 3 of 9'.
  • fahdfahd Member Posts: 226
    fond??

    Sorry i didn't get fond.
  • alok_kulalok_kul Member Posts: 8
    sorry its font not fond.
  • SogSog Member Posts: 1,023
    Who said anything that the barcode has to be displayed as barcode? If it is also a requirement, see alok_kul's post and search mibuso for downloads and info about barcodes.
    I think the problem here is that fahd can't find the Barcode - field in the sales line table.
    And ofcourse he can't if Sales Line is not customized.
    The table you should look in is item cross reference (5717). In there the item's barcode should be stored.
    In the onaftergetrecord of your report you can check if the sales line contains an item, has a barcode and fetch it to print on the report.
    |Pressing F1 is so much faster than opening your browser|
    |To-Increase|
  • fahdfahd Member Posts: 226
    Dear Mr. Sog,
    yes exactly i am want barcode field in the sales line table or if it can be visible on report 205(Order confirmation).

    As you explained i tried to go the report desing but i can't find such trigger which says onaftergetrecord.

    it would be great if you could explain any other way or if u would let me know that why onaftergetrecord is not showing in report 205.
  • SogSog Member Posts: 1,023
    Dear Mr. Fahd,

    You can find the onaftergetrecord trigger if you follow these steps.
    Open NAV Classic.
    Open the object Designer.
    Design report 205.
    When seeing the dataitems, select the one with sales line. (Either in blue or just your cursor in the same field).
    Select the code (menu "view" ->C/AL Code F9).
    If you do not see the trigger "Sales Line - OnAfterGetRecord()", please post a screenshot.

    If you are unable to completely follow these instructions (due to restrictions/license/...) then I fear you'll be unable to add a barcode to the report. (there is a workaround but I'm guessing it won't be the desired effect)
    |Pressing F1 is so much faster than opening your browser|
    |To-Increase|
  • fahdfahd Member Posts: 226
    Dear Mr. Sog,

    Thankkxx i found the onaftergetrecord. I didn't check in Sales line Data item thaz why it wasn't showing .

    Ok now i have reached here. Kindly tell me what should be given here in this trigger??

    Just to clear any confusion if exists. I don't need barcode to be printed with some barcode style like in barcode Format/standard or something. They are just simple integers that i want to be displayed on the report like for example 90239209392. Ihave the attached the example as well & that's what i am looking for.



    I Really appreciate the way you have explained thanks again. :)

    Regards,
    Fahd
  • SavatageSavatage Member Posts: 7,142
    Where to you have the UPC code stored?

    In the item table?
    Item-Record-Item
    UPC-Text-30
    OnAfterGetRecord
    If Item.Get(Salesline."No.") then
    UPC := Item."Item UPC/EAN Number" else
    UPC := '';

    add textbox to report with sourceexp = UPC

    Or do you have it in the Item Cross reference table?
  • fahdfahd Member Posts: 226
    Dear Mr. Savatage,

    Yes it is stored in Item cross reference table. In Table 27 there is a user defined field named " Barcode" having id 50012 & field type is CODE with 20 characters. I think it is mapped from item cross reference table.

    But i am also lil bit confused coz i can see another table 99001451 Barcodes data is also stored in that table as well. :-k

    in item table, in Global Variable there is one variable as well caled "BARCODES" Record "Barcodes".

    So Kindly tell me how to do this now???
  • SogSog Member Posts: 1,023
    I would suggest using the barcode from table item.
    I don't know the table 99001451.
    To continue adding the field:
    Design the report.
    Go to menu 'View' -> C/AL Globals.
    Add a new variable of type record and table item. (variableitem will be used in the code)
    Go to the onaftergetrecord trigger of the sales line.
    In that trigger write the following code (or the code suggested by Savatage)

    variableitem.init; //initialises the record but it's used to clear the barcode field
    if type = type::item then
    if variableitem.get("No.") then //the "No." is the Salesline."No." just like the option "type" is salesline.type
    variableitem.barcode

    Next go to the dataitems and go to the section designer and add your textfield with sourceexpression variableitem.barcode.
    The caption should be ok. So if you add the label with parentcontrol = id of your textfield.
    |Pressing F1 is so much faster than opening your browser|
    |To-Increase|
  • fahdfahd Member Posts: 226
    Voilaaa

    It's done.

    I would like to thanks and to everyone especially Mr. Sog and Mr. Savatage.

    thanks alottt for your help :)
Sign In or Register to comment.