Brandon wrote:
Can you please share your code for the report?
Sure, as soon as we insert the tblkeyboard to the report, we get many assets duplicated, that's the code.
Select Top 1000000 tsysOS.Image As icon,
tblAssets.AssetID,
tblAssets.AssetName,
tblComputersystem.Lastchanged,
tblAssets.Domain,
tblAssetCustom.PurchaseDate As PurchaseDate,
tblAssetCustom.Warrantydate As WarrantyExpiration,
tblAssets.Username,
Case
When (tblKeyboard.Layout Like '%00000407%') Then 'DE'
When (tblKeyboard.Layout Like '%00000409%') Then 'EN-US'
When (tblKeyboard.Layout Like '%00000809%') Then 'EN-UK'
When (tblKeyboard.Layout Like '%00000816%') Then 'Port-BRAZIL'
When (tblKeyboard.Layout Like '%00000416%') Then 'Port-BRAZIL'
When (tblKeyboard.Layout Like '%00010416%') Then 'Port-BRAZIL'
When (tblKeyboard.Layout Like '%0000040a%') Then 'ES'
When (tblKeyboard.Layout Like '%0000041d%') Then 'SWEDISH'
When (tblKeyboard.Layout Like '%0000040c%') Then 'FR'
When (tblKeyboard.Layout Like '%00010415%') Then 'PL'
When (tblKeyboard.Layout Like '%00000415%') Then 'PL'
When (tblKeyboard.Layout Like '%00020409%') Then 'NL'
When (tblKeyboard.Layout Like '%00000410%') Then 'IT'
When (tblKeyboard.Layout Like '%00010407%') Then 'DE-IBM'
When (tblKeyboard.Layout Like '%00000816%') Then 'PT-POR'
Else 'Unknown'
End As Layout,
tblAssets.Userdomain,
tblAssets.IPAddress,
tblAssets.Description,
tblAssetCustom.Manufacturer,
tblAssetCustom.Model,
tblAssetCustom.Location,
tsysIPLocations.IPLocation,
tsysOS.OSname As OS,
tblAssets.SP As SP,
tblAssets.Firstseen,
tblAssets.Lastseen
From tblComputersystem
Inner Join tblAssets On tblComputersystem.AssetID = tblAssets.AssetID
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Left Join tsysIPLocations On tsysIPLocations.StartIP <= tblAssets.IPNumeric
And tsysIPLocations.EndIP >= tblAssets.IPNumeric
Inner Join lansweeperdb.dbo.tblKeyboard On tblAssets.AssetID =
tblKeyboard.AssetID
Where tblComputersystem.Domainrole < 2 And tblAssetCustom.State = 1
Order By tblAssets.AssetName