pjohns
3rd December 2014, 15:14
Hello,

I'm trying to display the tdltc001.lsup field on the Pick List report by linking the tdltc001 table to tdilc401 using the following select statement. I can't get it to work and I think its down to how the join is being made.

The report script compiles OK but nothing gets printed for this new field

I confess to being very good at this so please bear with me.

Does my syntax look correct?


select tdltc001.lsup
from tdltc001, tdilc401
where tdltc001.clot = :tdilc401.clot and tdltc001.item = :tdilc401.item
selectdo

endselect

supp.lot = tdltc001.lsup


Thanks in advance

PJ

mark_h
3rd December 2014, 15:30
Well I would make a change.

select tdltc001.lsup
from tdltc001
where tdltc001.clot = :tdilc401.clot and tdltc001.item = :tdilc401.item
selectdo
endselect
supp.lot = tdltc001.lsup


Then exactly which field are you printing supp.lot or tdltc001.lsup? Which layout are you trying to print it and in which layout is the query? Now I am assuming you ran it in debug and the query actually found something.

pjohns
3rd December 2014, 15:51
Thanks for your reply Mark,

I had a eureka moment when eating lunch.

I needed to enter tdilc401.item and a report input field. It now works.

I was trying to print the supp.loc field.

mark_h
3rd December 2014, 17:17
Actually if you are finding the data in the report script you should not need a report input field. I think basically I just declare them as external in the script.