Report

write a report to Create a location for each sales man where location code is salesman code

I have taken salesperson as data item and declared location code in global variable and written code in

on after get record()

IF “Salesperson/Purchaser”.GET(“Salesperson/Purchaser”.Code) THEN

BEGIN

“Salesperson/Purchaser”.Code := Location.Code;

END;

and in body pre section()

CurrReport.SHOWOUTPUT(“Salesperson/Purchaser”.Code = Location.Code);

You need to insert record into Location table then why are assigning value in Slaes Person table?

No need to get the sales person record again in onaftergetrecord trigger.

you need to initialize the location record and insert sales person code to location code and insert…

Code Name LocationCode

AH Annette Hill AH

BD Bart Duncan BD

DC Debra L. Core DC

JR John Roberts JR

LM Linda Martin LM

MD Mary A. Dempsey MD

PS PS

RL RL

I got out put like this is it correct

ahh… sorry…

mis understand your question…

I thought you want to create location with name sales person…

write a report to Create a location for each sales man where location code is salesman code

this is my question

“Intelligent” (NOT) naming systems may seem like a good idea, at the time,but they have a habit of biting you later. Just create a foreign key relation between the tables.

Add a new field “Salesperson Code” to the Location table with a relation to the “Salesperson Table”. Or the other way around depending on your business needs.

If i am not wrong they are trainees and the questions they are posting are home works [;)]

All the more reason for them to think about the solution.