Help! needed to displaying an output in record format

Hi Friends,

Am new to Unix world and this is my first post in this forum.
I was stuck in displaying the content.

while displaying the content the below points to be taken care

1 ) The header format is repeating
2) To display the value in table format
-------------------------------------------
Example: I have a file which contains the below data
--------------------------------------------
empname
robert
empid
787
design
consultant
empname
alex
empid
898
design
advocate
------------------------------
Desired output should be
------------------------------
empname empid design
robert 787 consultant
alex 898 advocate
--------------------------------------------------------------
I have achieved the below output but this is not my requirement.
---------------------------------------------------------------
empname robert
empid 787
design consultant
empname alex
empid 898
design advocate

Kindly help me to achieve the desired output as shown above

Thanks in advance.

Hello,

Please use the code tags while posting commands. Also let us know what you have tried so far.

Thanks,
R. Singh

Thanks for your response.

With the help of below code i have achieved the given output shown in my previous thread

paste -s ' ' - - < inputfile > outputfile

---------- Post updated at 11:37 PM ---------- Previous update was at 10:23 PM ----------

Typo error in my previous post, the updated one below.

paste -d ' ' - - < inputfile > outputfile

Kindly help me to achieve the desired output.
------------------------------
Desired output should be
------------------------------
empname empid design
robert 787 consultant
alex 898 advocate

Thanks