cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
rsellers
Engaged Sweeper II
I'm trying to create a report that lists all computers not having a specific software title installed.
I only want a return of all systems with OS Win 7, Win 10, or Win XP installed.
When I run the report the same PC can be listed multiple times. It seems the most usually reason is because of the DomainRole. I have added a filter to pull Member workstation only.

Can someone advise a way to pull a report with 1 Unique PC per line that fits the filter? (We are not using SQL Server)
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.IPAddress,
tblAssets.Domain,
tblFileVersions.Found,
tblFileVersions.FilePathfull,
tblAssets.Description,
tblFileVersions.Lastchanged,
tblAssets.Lastseen,
tblADComputers.OU,
tblAssets.Username As Username1,
tblAssetCustom.Manufacturer,
tblAssetCustom.Model,
tblAssetCustom.Serialnumber,
tblDomainroles.Domainrolename,
tblAssetCustom.Location As Location1,
tblAssetCustom.Branchoffice,
tblAssetCustom.Building,
tblAssetCustom.Department,
tsysOS.OSname
From tblAssets
Inner Join tblFileVersions On tblAssets.AssetID = tblFileVersions.AssetID
Inner Join tblADComputers On tblAssets.AssetID = tblADComputers.AssetID
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID,
tblDomainroles,
tsysOS
Where tblFileVersions.Found = 'False' And tblFileVersions.FilePathfull
Like 'c:\ProgramData\Dell\KACE\kinventory.db' And
tblDomainroles.Domainrolename = 'Member workstation' And tsysOS.OSname =
'Win XP' Or tsysOS.OSname =
'Win Win 7' tsysOS.OSname =
'Win 10'
Order By tblAssets.AssetName

I'm only concerned of the current installed OS, not any previously installed versions.
If I run the report and manually type a filter at the top section it works fairly correct. What I'd like to see is a way to take that filtered report of what I see and created an export of the code that could be saved and run later. Possible?
5 REPLIES 5
rsellers
Engaged Sweeper II
Thanks for the suggestion but unfortunately it still shows me all PC with warranty dates. Our current range of dates runs from 2009 to 2019. That's not filtering only the pc within the specified range.
I'll keep trying....
ProfileNL
Engaged Sweeper III
I think this is what you wnat

Select Top (1000000) tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypename,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.IPAddress,
tblAssets.Lastseen,
tblAssets.Lasttried,
tblAssetCustom.Warrantydate,
tblAssets.OScode,
tblAssetCustom.Manufacturer,
tblAssetCustom.Model,
tsysOS.OSname,
tblDomainroles.Domainrolename
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tsysOS On tsysOS.OScode = tblAssets.OScode
Inner Join tblComputersystem On tblAssets.AssetID = tblComputersystem.AssetID
Inner Join tblDomainroles On tblComputersystem.Domainrole =
tblDomainroles.Domainrole
Where (tsysAssetTypes.AssetTypename <> 'Printer' And
tblAssetCustom.Warrantydate Between Cast('01-01-2012' As Date) And
Cast('12-31-2017' As Date)) Or
(tsysOS.OSname = 'Win XP') Or
(tsysOS.OSname = 'Win 7') Or
(tsysOS.OSname = 'Win 10')
Order By tblAssets.AssetName
rsellers
Engaged Sweeper II
I have the report working better now. It selects and displays only PC with OS (Win XP, Win 7, or Win 10) only those as "Member workstations.

Now the issue left seems to be date range. I want to specify the report only returns a list with warranty expiration between 2 dates. This is returning everything that meets the above criteria but not the date range.
Is there a better way to sort between 2 dates?

Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypename,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.IPAddress,
tblAssets.Lastseen,
tblAssets.Lasttried,
tblAssetCustom.Warrantydate As Warrantydate,
tblAssets.OScode,
tblAssetCustom.Manufacturer,
tblAssetCustom.Model,
tsysOS.OSname,
tblDomainroles.Domainrolename
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tsysOS On tsysOS.OScode = tblAssets.OScode,
tblDomainroles
Where ((tsysAssetTypes.AssetTypename <> 'Printer' And
tblAssetCustom.Warrantydate <= Cast('01-01-2012' As DATE) Or
tblAssetCustom.Warrantydate >= Cast('12-31-2017' As DATE)))
Or
(tsysOS.OSname = 'Win XP' And tblDomainroles.Domainrolename =
'Member workstation') Or
(tsysOS.OSname = 'Win 7' And tblDomainroles.Domainrolename =
'Member workstation') Or
(tsysOS.OSname = 'Win 10' And tblDomainroles.Domainrolename =
'Member workstation')
Order By tblAssets.AssetName
rsellers
Engaged Sweeper II
Thanks. That's closer.
The report returned listed each PC 2 times. Each showing same PC on 2 lines as Win 10 and Win XP.
Strange there were no Win 7 in the output.
Nick_VDB
Champion Sweeper III
Unfortunately it is not possible to do an export of the code that would be generated when you filter certain columns. The report has to be created manually to get the information that you are after.

We did edit your report below as it did not have the criteria applied for each windows version that you are after.

Select Distinct Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.IPAddress,
tblAssets.Domain,
tblFileVersions.Found,
tblFileVersions.FilePathfull,
tblAssets.Description,
tblFileVersions.Lastchanged,
tblAssets.Lastseen,
tblADComputers.OU,
tblAssets.Username As Username1,
tblAssetCustom.Manufacturer,
tblAssetCustom.Model,
tblAssetCustom.Serialnumber,
tblDomainroles.Domainrolename,
tblAssetCustom.Location As Location1,
tblAssetCustom.Branchoffice,
tblAssetCustom.Building,
tblAssetCustom.Department,
tsysOS.OSname
From tblAssets
Inner Join tblFileVersions On tblAssets.AssetID = tblFileVersions.AssetID
Inner Join tblADComputers On tblAssets.AssetID = tblADComputers.AssetID
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID,
tblDomainroles,
tsysOS
Where (tblFileVersions.Found = 'False' And tblFileVersions.FilePathfull Like
'c:\ProgramData\Dell\KACE\kinventory.db' And tblDomainroles.Domainrolename =
'Member workstation' And tsysOS.OSname = 'Win XP') Or
(tblFileVersions.Found = 'False' And tblFileVersions.FilePathfull Like
'c:\ProgramData\Dell\KACE\kinventory.db' And tblDomainroles.Domainrolename =
'Member workstation' And tsysOS.OSname = 'Win Win 7') Or
(tblFileVersions.Found = 'False' And tblFileVersions.FilePathfull Like
'c:\ProgramData\Dell\KACE\kinventory.db' And tblDomainroles.Domainrolename =
'Member workstation' And tsysOS.OSname = 'Win 10')
Order By tblAssets.AssetName