I am preparing a report of a vehicle loan voucher. It is for a module of vehicles in pool, in that module you generate the corresponding Folios for the loan of the vehicle to some employee.
My job is to create a loan voucher where the data of the employee in question is displayed, the vehicle to borrow, departure and return (date, time, odometer) and finally the signatures of who authorizes the departure of the vehicle and who receives the unit.
The report I did in fast report, I already have the query executed well and the report is practically done only one detail, in the space for the signature of who authorized the departure of the vehicle the corresponding field is an id number whose value is linked to the employee table.
In other words, the id it contains is the id of the employee in its corresponding table. My question would be how can I specify the name of the employee that corresponds to that ID number to be shown in the report. I enclose the file with the SQL query as well as an example of the pdf loan report.
SELECT PoolVehicularMaster.Fecha AS FechaFolio, PoolVehicularMaster.Folio,
PoolVehicularMaster.FechaInicial, PoolVehicularMaster.FechaFinal,
PoolVehicularMaster.HoraInicial, PoolVehicularMaster.HoraFinal,
PoolVehicularMaster.Concatena AS ConcatenaVehiculo,
PoolVehicularMaster.NombreEmpleado,
PoolVehicularMaster.Departamento AS DepartamentoEmpleado,
PoolVehicularMaster.NoEconomico, PoolVehicularMaster.LecturaMedidorInicial,
PoolVehicularMaster.LecturaMedidorFinal, PoolVehicularMaster.Comentarios,
PoolVehicularMaster.Venc_Licencia, Cat_TiposDeLincencia.Descripcion AS
TipoLicencia,
Cat_Empleados.Num_Licencia, PoolVehicularMaster.Id_Autorizo,
Mast_Vehiculos.Lectura_Medidor, Mast_Vehiculos.FechaUltimaLectura,
Cat_PoolVehicularAsuntos.Descripcion AS DescripcionAsunto,
Cat_PoolVehicularDestinos.Descripcion AS DescripcionDestino
FROM PoolVehicularMaster
LEFT JOIN Mast_Vehiculos ON
PoolVehicularMaster.Id_Vehiculo=Mast_Vehiculos.Id_Vehiculo
LEFT JOIN Cat_Empleados ON
PoolVehicularMaster.Id_Empleado=Cat_Empleados.Id_Empleado
LEFT JOIN Cat_TiposDeLincencia ON
Cat_Empleados.Id_TipoLicencia=Cat_TiposDeLincencia.Id_TipoLicencia
LEFT JOIN PoolVehicularDetalle1 ON
PoolVehicularMaster.Id_PoolVehicularMaster=PoolVehicularDetalle1.
Id_PoolVehicularMaster
LEFT JOIN Cat_PoolVehicularAsuntos ON
PoolVehicularDetalle1.Id_PoolVehicularAsunto=Cat_PoolVehicularAsuntos.
Id_PoolVehicularAsunto
LEFT JOIN Cat_PoolVehicularDestinos ON
PoolVehicularDetalle1.Id_PoolVehicularDestino=Cat_PoolVehicularDestinos.
Id_PoolVehicularDestino