Report ..help with Get...on after get record

KareltjeKareltje Member Posts: 6
Hi,

I created a simple report with 1 dataitem (production BOM line).
I thought it was quit simple to add the description of the production BOM header.
Anyway some difficulies, and have an overflow message.

Anyone can give some advice?

thanks!

Answers

  • vijay_gvijay_g Member Posts: 884
    check datatype and length for variable.
  • kinekine Member Posts: 12,562
    It depends on what you are doing. Easiest is to define record variable for the header, get the header, and siplay directly the description of this record to the report. You do not need to assign anything...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • KareltjeKareltje Member Posts: 6
    I tried, but seems not working. get messagen that item not excist.
    Probably i miss something.
    Can someone describe in detalis steps what I need to do!
    I really appriciated that.

    Thanks!
  • kinekine Member Posts: 12,562
    Take it from other side: show us your code, we will tell you what is wrong. For now for me it seems that you even didn't tried or you are missing some basic knowledge about C/Al... :whistle:
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • DenSterDenSter Member Posts: 8,305
    Kareltje wrote:
    some difficulies, and have an overflow message.
    That can mean a thousand things. If you don't tell us exactly what the difficulties are and what the exact error message is, then nobody will know how to help you.
  • KareltjeKareltje Member Posts: 6
    I did next:

    DataItem= Production Bom Line
    Variables = gDescription / datatype = record / subtype= Production Bom Header
    In form : groupheader/ = gDescription.Description
    Code in On after get record of dataItem = gDescription.GET ("Description");
    Then i have the overflow message text to code .

    I create a list for the BOM list per item and i would like to add in the groupheader the description of the item.
  • ssinglassingla Member Posts: 2,973
    Try
    gDescription.GET("Production BOM No.");
    CA Sandeep Singla
    http://ssdynamics.co.in
  • David_SingletonDavid_Singleton Member Posts: 5,479
    Kareltje wrote:
    I did next:

    DataItem= Production Bom Line
    Variables = gDescription / datatype = record / subtype= Production Bom Header
    In form : groupheader/ = gDescription.Description
    Code in On after get record of dataItem = gDescription.GET ("Description");
    Then i have the overflow message text to code .

    I create a list for the BOM list per item and i would like to add in the groupheader the description of the item.


    I am guessing you are very new to Navision and C/AL. So one important hint.

    Read the Terminology guide and follow it exactly. if you use bad variable names it may seem silly now, but it will make your life very difficult. Don't worry that its different to what you are used to, just follow the rules. So your code would be:

    DataItem= Production Bom Line
    Variables = ProdBomHeader / datatype = record / subtype= Production Bom Header
    Section groupheader
    Source Expression = PrdoBomHeader.Description
    On after get record of dataItem
    ProdBomHeader.("Production BOM No.");


    If you feel the need to use g or l or dec or int or any other prefix to variable names, then quit Navision and become a C# developer. If you don;t do things the Navision way, you will never get it.
    David Singleton
Sign In or Register to comment.