I am building a basic report for my manager. It has to have the following data: Computer Type, Location, Domain, IP Address, Serial Number, Operating System, Make, Model, Processor, Memory/RAM, Hard Drive Size, AntiVirus, Warranty Expiration Date, Uptime.
Below is the code:
Select Top 1000000 tsysOS.Image As icon,
tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Description,
TsysChassisTypes.ChassisName As [Computer Type],
tsysIPLocations.IPLocation As Location,
tblAssets.Domain,
tblAssets.IPAddress,
tblAssetCustom.Serialnumber As [Serial Number],
tsysOS.OSname,
tblSystemEnclosure.Manufacturer As [PC Make],
tblAssetCustom.Model As [PC Model],
tblAssets.Processor,
tblAssets.Memory,
tblAntivirus.DisplayName,
tblDiskdrives.Volumename As [Hard Drive Name],
tblDiskdrives.Size As [Hard Drive Size],
tblAssetCustom.Warrantydate,
tblAssets.Uptime
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tblSystemEnclosure On
tblAssets.AssetID = tblSystemEnclosure.AssetID
Inner Join TsysChassisTypes On TsysChassisTypes.Chassistype =
tblSystemEnclosure.ChassisTypes
Left Join tsysIPLocations On tblAssets.LocationID = tsysIPLocations.LocationID
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Inner Join tblAntivirus On tblAssets.AssetID = tblAntivirus.AssetID
Inner Join tblDiskdrives On tblAssets.AssetID = tblDiskdrives.AssetID
Where TsysChassisTypes.ChassisName Not Like 'Other' And
tblAntivirus.DisplayName Not Like 'Windows%' And
tblDiskdrives.Volumename Is Not Null And tblDiskdrives.Volumename Not Like
'Audio%' And tblDiskdrives.Volumename Not Like '%Recovery' And
tblDiskdrives.Volumename Not Like '%USB%' And tblAssetCustom.State = 1
Order By tblAssets.AssetName
- - - - - - - -
As you can see, I've been able to meet the criteria of the report specs in its basic form. However, I have a couple of hitches that need ironed out and hopefully someone could assist.
So, in order:
1. For "Computer Type", we have Surface Tablets that show up as laptops. I would like to figure out if either A- there's a way to tell LANSweeper that all Surfaces are tablets without messing with report coding (it would just show up as a "Tablet" under Computer Type), or B- somehow code the report that whenever it sees an asset as "SUR" that it automatically generates the Computer Type as a Tablet
2. For "Hard Drive Size", my manager is only looking for the size and does not want the Volume Name included. I would like to be able to hide that column in the report automatically if possible. Leaving it in will allow me to better filter out unnecessary 'volumes' like USB drives, Backup Drives, flash disks and Recovery partitions. I'm only trying to report on the main/boot drive and not anything else. Granted, there may be some manual labor involved to filter out the oddball named volumes, but it will help reduce duplicate asset entries in the report. Additionally, if possible, I would like to display the 'byte size' as GB or MB (and I can rename the column title as needed) and I don't know how to go about inserting that conversion into the table.
3. For "Anti-Virus", I think ultimately I would like to have each detected A/V-related software title displayed on the same line. So, for example, For PCs with Symantec Endpoing Protection and Malwarebytes Anti-Malware Agent installed will also have Windows Defender installed but disabled. Originally filtering out Windows Defender, I inadvertently filtered out entries that ONLY have Windows Defender (which those machines would flag for needing SEP and MBAM). If there would be a way to place all detected A/V software on one line, that would greatly reduce the duplicate entries of assets.
4. For "UpTime", this would be a similar request as the "Hard Drive Size". I don't know how to make the conversion from 'seconds' to show days/hours/minutes/etc. I need to make that entry easier on the eyes to read. Unless I have people reading this report able to know that 3,000,000 seconds is approximately 35 days.