cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
mhammond
Champion Sweeper
I would like to run a customized report based on the Warranty Expiration reports already in the LS product. However, instead of the manufacturer's warranty date, I would like to base it on the Purchase Date, +5 years. We are attempting to baseline a refresh plan for our assets, and the 'regime' before me just bought things willy-nilly with randomly-purchased warranties on all the hardware - there are warranties that are only 1 year long, 2 years and 3, where one actually has an extended up to 7 years.

Here is the code for the "Asset: Out of Warranty" report:
Select Top 1000000 tsysAssetTypes.AssetTypeIcon10 As icon,
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,
tblAssets.IPAddress,
tblAssets.Description,
tblAssetCustom.Manufacturer,
tblAssetCustom.Model,
tblAssetCustom.Location,
tsysIPLocations.IPLocation,
tblAssets.Firstseen,
tblAssets.Lastseen
From tblAssetCustom
Inner Join tblAssets On tblAssetCustom.AssetID = tblAssets.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Left Join tsysIPLocations On tblAssets.LocationID = tsysIPLocations.LocationID
Where tblAssetCustom.Warrantydate < GetDate() And tblAssetCustom.State = 1 And
tblAssets.Assettype <> 66
Order By [Warranty Expiration] Desc


I have been playing around swapping different table names to try and conform around Purchase Date, but I can't seem to get it right. Then, presuming I'm able to finally get it adjusted, I wouldn't know how to add the 5 years to that date.

So, an asset purchased today in 2014, I would want the report to say that it was out of warranty today, this year; 5 years after purchase date.

In addition, not knowing if it is possible, I would similarly want the "Out of Warranty in 60 days" report adjusted to match so if an asset was purchased December 14th, 2014, that it would show up on that report today (technically my example here is over 60 days given how many days there are per month, but you get the picture).

Here is the code for the '60' day report:

Select Top 1000000 tsysAssetTypes.AssetTypeIcon10 As icon,
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,
tblAssets.IPAddress,
tblAssets.Description,
tblAssetCustom.Manufacturer,
tblAssetCustom.Model,
tblAssetCustom.Location,
tsysIPLocations.IPLocation,
tblAssets.Firstseen,
tblAssets.Lastseen
From tblAssetCustom
Inner Join tblAssets On tblAssetCustom.AssetID = tblAssets.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Left Join tsysIPLocations On tblAssets.LocationID = tsysIPLocations.LocationID
Where tblAssetCustom.Warrantydate < GetDate() + 60 And
tblAssetCustom.Warrantydate > GetDate() And tblAssetCustom.State = 1
And tblAssets.Assettype <> 66
Order By [Warranty Expiration] Desc
0 REPLIES 0

New to Lansweeper?

Try Lansweeper For Free

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

Try Now