The problem is that you need to make sure that there is at least one record in your tblVisitTicket table for this query to work. If there are none the subquery you use for PIVOT source will return zero rows. The best way to fix it is to LEFT JOIN it with a fake numbers table that will contain numbers 1, 2, 3, like this:
SELECT
VisitID,
VisitDate,
IssuedBy,
VisitPurpose,
CompanyName,
SPname as 'SalePerson',
[1] as 'Person 1',
[2] as 'Person 2',
[3] as 'Person 3'
FROM (
SELECT
WK.VisitID,
WK.VisitDate,
WK.IssuedBy,
WK.VisitPurpose,
WK.CompanyName,
WK.SPname,
N.n AS EngineerNo,
WK.[AlongwithName]
FROM
(SELECT 1 AS n UNION ALL SELECT 2 AS n UNION ALL SELECT 3 AS n ) N
LEFT JOIN
(SELECT
TD.VisitID,
TD.VisitDate,
TD.IssuedBy,
TD.VisitPurpose,
TC.CompanyName,
SP.SPname,
ROW_NUMBER() OVER(PARTITION BY TD.VisitID ORDER BY TE.AlongwithID) AS EngineerNo,
EN.[AlongwithName]
FROM
tblVisitTicket AS TD
INNER JOIN tblVisit_Alongwith AS TE
ON TD.VisitID = TE.VisitID
INNER JOIN tblAlongWith AS EN
ON TE.AlongwithID = EN.AlongwithID
INNER JOIN tblCompany AS TC
ON TD.CompanyID = TC.CompanyID
INNER JOIN tblSalePerson AS SP
ON TD.SalePersonID = SP.SalePersonID
WHERE TD.VisitStatus = 1 ) WK ON N.n = WK.EngineerNo
) AS DT
PIVOT(MAX([AlongwithName])
FOR [EngineerNo]
IN([1], [2], [3])
) AS PT