cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
anthony_cox
Engaged Sweeper
I am wanting to display warranty information to one of the asset groups that I have setup. Is this possible? If so, does anyone know how?
1 ACCEPTED SOLUTION
Daniel_B
Lansweeper Alumni
In order to filter on a specific asset group, add tblAssetGroupLink and tblAssetGroups to your report and filter on tblAssetGroups.AssetGroup. The example report below lists warranty details of assets in group "YourExampleGroup"

Select Top 1000000 tblAssets.AssetID,
tblAssetGroups.AssetGroup,
tblAssets.AssetName,
tsysAssetTypes.AssetTypeIcon16 As icon,
tblWarranty.PurchaseCountry,
tblWarranty.ShipDate,
tblWarrantyDetails.WarrantyStartDate,
tblWarrantyDetails.WarrantyEndDate,
tblWarrantyDetails.ServiceType,
Case When GetDate() > tblWarrantyDetails.WarrantyEndDate Then 'yes' Else 'no'
End As Expired,
tblWarranty.Error
From tblAssets
Left Join tblWarranty On tblWarranty.AssetId = tblAssets.AssetID
Left Join tblWarrantyDetails On tblWarranty.WarrantyId =
tblWarrantyDetails.WarrantyId
Inner Join tsysAssetTypes On tblAssets.Assettype = tsysAssetTypes.AssetType
Inner Join tblAssetGroupLink On tblAssets.AssetID = tblAssetGroupLink.AssetID
Inner Join tblAssetGroups On tblAssetGroups.AssetGroupID =
tblAssetGroupLink.AssetGroupID
Where tblAssetGroups.AssetGroup Like 'YourExampleGroup'
Order By tblAssets.AssetName,
tblWarrantyDetails.WarrantyEndDate Desc

View solution in original post

1 REPLY 1
Daniel_B
Lansweeper Alumni
In order to filter on a specific asset group, add tblAssetGroupLink and tblAssetGroups to your report and filter on tblAssetGroups.AssetGroup. The example report below lists warranty details of assets in group "YourExampleGroup"

Select Top 1000000 tblAssets.AssetID,
tblAssetGroups.AssetGroup,
tblAssets.AssetName,
tsysAssetTypes.AssetTypeIcon16 As icon,
tblWarranty.PurchaseCountry,
tblWarranty.ShipDate,
tblWarrantyDetails.WarrantyStartDate,
tblWarrantyDetails.WarrantyEndDate,
tblWarrantyDetails.ServiceType,
Case When GetDate() > tblWarrantyDetails.WarrantyEndDate Then 'yes' Else 'no'
End As Expired,
tblWarranty.Error
From tblAssets
Left Join tblWarranty On tblWarranty.AssetId = tblAssets.AssetID
Left Join tblWarrantyDetails On tblWarranty.WarrantyId =
tblWarrantyDetails.WarrantyId
Inner Join tsysAssetTypes On tblAssets.Assettype = tsysAssetTypes.AssetType
Inner Join tblAssetGroupLink On tblAssets.AssetID = tblAssetGroupLink.AssetID
Inner Join tblAssetGroups On tblAssetGroups.AssetGroupID =
tblAssetGroupLink.AssetGroupID
Where tblAssetGroups.AssetGroup Like 'YourExampleGroup'
Order By tblAssets.AssetName,
tblWarrantyDetails.WarrantyEndDate Desc