→ Having trouble accessing our new support portal or creating a ticket? Please notify our team here

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
steven_reid
Engaged Sweeper

Hi,

I am trying to create a report that shows assets that are out of warranty by a set time.  I have modified a previous report that I found to include the Asset Location

Report.jpg

 

The Asset location is set here for each asset

 

location.jpg

Sometimes there is an asset which doesnt have a location allocated, and this asset is excluded from the report

Location Missing.jpg

 

 

How can I change the report to have that show up on the report?  I have tried a Right Join but it is still not showing. 

Select Top (1000000) tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets1.AssetName As LocationName,
tblAssetCustom.Department,
tblAssets.AssetID,
tblAssets.AssetName,
tblAssetCustom.Serialnumber,
tblAssetCustom.PurchaseDate As [Purchase Date],
tblAssetCustom.Warrantydate As [Warranty Expiration],
tblAssets.Domain,
tblAssets.Username,
tblAssets.Userdomain,
tsysAssetTypes.AssetTypename As Type,
tsysAssetTypes.AssetType As TypeID,
tblAssets.IPAddress,
tsysIPLocations.IPLocation,
tblAssets.Description,
tblAssetCustom.Manufacturer,
tblAssetCustom.Model,
tblAssets.LsAgentVersion,
tblAssets.LastLsAgent,
tblAssets.Firstseen As [Created at],
tblAssets.Lastseen As [Last successful scan],
tblAssets1.AssetID As LocationID
From tblAssetCustom
Inner Join tblAssets On tblAssetCustom.AssetID = tblAssets.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tblAssetRelations On tblAssetRelations.ChildAssetID =
tblAssets.AssetID
Inner Join tsysAssetRelationTypes On tsysAssetRelationTypes.RelationTypeID =
tblAssetRelations.Type
Right Outer Join tblAssets As tblAssets1 On tblAssets1.AssetID =
tblAssetRelations.ParentAssetID
Right Outer Join tsysIPLocations On tblAssets.LocationID =
tsysIPLocations.LocationID
Where tblAssetCustom.Warrantydate < '2024-08-01' And tblAssetCustom.State = 1
And tblAssets.Assettype Not In (288, 66, 208)
Order By [Warranty Expiration] Desc

Do I need to handle nulls?

 

 

1 REPLY 1
David_GF
Lansweeper Tech Support
Lansweeper Tech Support

Hi @steven_reid , it seems you have already open a ticket with our Support engineers for help with this report. They will follow up in your ticket and, once solved, we will share the query here too so other forum users can benefit of the solution.



~~~~~~~ (〃 ̄︶ ̄)人( ̄︶ ̄〃) ~~~~~~~
Sweep that LAN, sweep it!

New to Lansweeper?

Try Lansweeper For Free

Experience Lansweeper with your own data.
Sign up now for a 14-day free trial.

Try Now