Notification

Icon
Error

Default 'warranty' Report Adjustments or Clones - Change warranty reporting based on Purchase Date instead of Warranty End Date

Posted: Monday, October 14, 2019 7:22:07 PM(UTC)
Cripple.Zero

Cripple.Zero

Member Original PosterPosts: 29
0
Like
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

Active Discussions

Lansweeper NOT doesn't work as expected
by  KevinA-REJIS   Go to last post Go to first unread
Last post: Yesterday at 5:49:29 PM(UTC)
Lansweeper Combined Vulnerability Report Q1 2019
by  Leslie Stroobant  
Go to last post Go to first unread
Last post: Yesterday at 3:27:42 PM(UTC)
Lansweeper All Devices with WINS Service Running on the Network
by  Andy.S   Go to last post Go to first unread
Last post: Yesterday at 2:44:56 PM(UTC)
Lansweeper Physical Laptops and Desktops Only
by  pryan67  
Go to last post Go to first unread
Last post: Yesterday at 1:51:56 PM(UTC)
Lansweeper Assistance With AV & Bitlocker Report
by  Andy.S   Go to last post Go to first unread
Last post: Yesterday at 12:50:47 PM(UTC)
Lansweeper Count of completed KB installation Report
by  jamie21  
Go to last post Go to first unread
Last post: 6/4/2020 11:49:57 AM(UTC)
Lansweeper local admin users of a specific device
by  Andy.S   Go to last post Go to first unread
Last post: 6/4/2020 10:42:23 AM(UTC)
Lansweeper Bitlocker Report not contain all computers
by  Andy.S  
Go to last post Go to first unread
Last post: 6/3/2020 6:20:53 PM(UTC)