int userId = Convert.ToInt32(ReportParameters.Parameters[“UserId”].Single, cultureInfo);
O id do utilizador logado.
comBuilder.AppendLine(" ISNULL(D.CommunicationNumber, ‘’) + ’ / ’ + D.Imei Identification,");
coluna que deve ser imprimida por administrador apenas
DECLARE
–@userId INT = 10
@userId INT = 160750
SELECT t0.DeviceId,
t0.Code,
t0.[Description],
t0.Imei,
t0.CommunicationNumber,
ISNULL(t0.CommunicationNumber, ‘’) + ’ / ’ + t0.Imei AS [DeviceIdentification],
userTypeInCompany.UserType
FROM [Communications].Devices AS t0
CROSS APPLY [Configurations].UfnGetUserType(@userId, t0.CompanyId) AS userTypeInCompany
WHERE Code = N’TEST_VR-00-33-44’
–UserId “loggado”: Convert.ToInt32(ReportParameters.Parameters[“UserId”].Single, cultureInfo);
Se administrador estiver logado na aplicação pode imprimir está coluna: ISNULL(t0.CommunicationNumber, ‘’) + ’ / ’ + t0.Imei AS [DeviceIdentification],
Caso seja Utilizador não imprime sai vazia.