cancel
Showing results for 
Search instead for 
Did you mean: 

How can I display the first and last name using a paramater as employee ID?

Former Member
0 Kudos

Hi SAP,

I have a parameter that is called {? Employee ID}. What I want to do is display the first and last name based on the employee ID value entered in {? Employee ID} in the page header of the report. Right now, when I put the following formula in the page header only some pages get the right result while other pages dont....

if table.employeeid = {? Employee ID} then

table.firstname" "table.lastname

It appears as though if the first record in the details section on the beginning of each page happens to be the employee under {? Employee ID} then it prints it correctly, if it isn't I get a null value in the page header.

Anyone have any ideas?

Z

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Try this,

Whileprintingrecords;

if ={?EmpID} then

& " " & ;

Also check the option "Default values for null" in the formula editor.

Regards,

Vinay

Answers (1)

Answers (1)

Former Member
0 Kudos

Unfortunately, your recommendation did not work. I did find a solution nevertheless. I created 2 stringvar formulas, one for first name and one for last name and I also used the Instr function. Once I played around with the variables, I was able to get it to print on each page header. If you're curious I can elaborate further. Thanks for your response.