customer and vendor code in option form field.

I want to make a report on customer leder entry and vendor ledger entry table.

here report will filter from date and to date from posting date, currency from currency table, customer and vendor code in a code field.

report out put will be as like

customer/vendor code -----name— beg.amount-inflow-outflow,endamount.

I need both vendor and cusotmer. but customer is in customer table and vendor in vendor table.

which table should i add for data item?

how can i add a code field in option form for both customer and vendor?

You dont need to add the dataitem, you can simply get the Cust.Get() from cust. ledger entry and Vend.Get() from vendor ledger entry…

What do you mean by below statement?

how can i add a code field in option form for both customer and vendor?

I supposed that if customer can filter with vendor and customer code from option field, i meant can pick code from field. It will be good.

Now i understand that it is not possible to pick both code from a same field. is it possible?

I think i need two data item one is for vendor and another one is for customer.

because when i will filter by posting from date and to date, currency code, and customer code , it will show only customer information and calculation.

when i will filter with same field but vendor code, then it will show vendor information and necessary calculation.

when i will not select code for vendor or customer, it will show both vendor and customer.

how can i do this?

Yes, you need two global variables(no need of dataitems)…

You have to differetiate it with cust.led entry table and vend. ledger entry table…

if cust. ledger entry table then Cust.Get()

If vend. ledger entry table then Vend.Get()