Error in report using multiple table

hasancheemahasancheema Member Posts: 6
Hello,

I am a beginner programmer in NAV. I am developing a report which shows the Purchase Order lines. Also i am showing the Warehouse receipt number from another table for those lines which are already received.
A strange thing happens when i run the report it shows the first record with empty receipt number and slides down the record to another row. Please see attached and help me out of this.

Regards,

Comments

  • SavatageSavatage Member Posts: 7,142
    can you show us the code you used to get the new value & what trigger you put it on?
  • kinekine Member Posts: 12,562
    As Savatage wrote, the problem is in bad design of the report. You need to think about the process flow of the report. You are filling the displayed variable after it was displayed. Thus you see the value "shifted" by one record...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • hasancheemahasancheema Member Posts: 6
    There is no code involved in this. However there are three tables like this
    Purchase Header
    Purchase Lines
    Posted Whse. Receipt Line

    The link between first two is the PO Number and the link between second and third also is PO Number.

    In report designer i have a header and purchase line body in which i have placed a field from the third table. NO CODE AT ALL just simple displaying.
  • kinekine Member Posts: 12,562
    Donot forget that nested dataitems are processed after the body sections of parent is already displayed... thus if you use data from nested dataitem in parent body section, you will see data from previous loop, thus the wrong one...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • hasancheemahasancheema Member Posts: 6
    I did a workaround and it seems to be working. I created a flowfield on the second table and looked up the value from the third table and it seems to be working fine.
Sign In or Register to comment.