eric.dizon
21st November 2012, 21:03
Hi,

I've created a custom print dialog session that has Input Fields that are based from user inputs. bfdt.f is a calculated field I would like to pass on the report I am using but I am confused how to do it because I can't utilize it in my read.main.table() function. How to to pass bfdt.f in my Select statement?

Input Fields of Dialog box
extern domain tcitem item.f fixed |Item
extern domain tcqsl1 qrdr.f |Quantity
extern domain tcpdno pdno.f |Production Order #
extern domain tcutcs pddt.f |Production Date
extern domain tcutcs bfdt.f |Best Before Date


In the function read.main.table()

select tisfc001.*, whwmd400.npsl, whwmd400.kpsl, tgbrg835.user, tccom 100.bpid, tccom100.nama, {bfdt.f}??
from tisfc001, whwmd400, tgbrg835, tccom100
where tisfc001._index1 = {:pdno.f}
and tisfc001.mitm = whwmd400.item
and tgbrg835.user = {:oprt.f}
and tccom100.bpid = {:spid.f}
selectdo
rprt_send()
endselect

mark_h
21st November 2012, 22:55
I know I am probably answering something wrong since this is an LN questions, but in 4c4 if the variable is declared as extern domain then it goes when the rprt_send is it and the variable is added to the input fields of the report. No reason to add it to the select statement. Typically I calculate fields in the selectdo statement and send it with each record found - of course this is assuming this is not an ln feature.

Now an LN user, who probably understands the question can answer. :)

MilindV
22nd November 2012, 07:49
@mark_h Its same in LN as well. No difference at all.:)

JaapJD
22nd November 2012, 08:26
You can pass a field from the session to the report by declaring it as an external variable in the session (as you did already), calculating it in the session and defining the same variable as Report Input Field for the report.