How to Fetch data from another table

Hi

I create new table Item detail and i declare global variable VModel. ModelNo field Exist in Item Detail Table . I am creating New report using sales line for barcode report. problem this how to fetch ModelNo from Item Detail table. i also declare variable for Itemdeatil table.

itemdetail.reset;

itemdetail.setrange(Itemdetail.No,Salesline.No);

if itemdetail.Findfirst then

vmodel:=itemdetail.ModelNo

but this code not working

Hi [mention:c0f6fa63b0d942ae85a723e62a6521e1:e9ed411860ed4f2ba0265705b8793d05] ,

The code seems correct but i have some questions -

Questions -

  1. Does Item Details Table Field No. , contains Item No. (i am assuming that based on code).

  2. What if there are multiple Models per Item in Item Details Table, which one you want in report . (i hope the table is designed to cater that only).

  3. Where are you writing the piece of code in the report? which trigger.

  4. What is your sales line belong to anything other than Item, shouldnt you take care of that?

dear Sir
Problem is solved.

Share your codeā€¦