cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
max204
Engaged Sweeper II
Hello

There's a built in report named "Disk: Workstations less than 1 GB free HD".
This only works with desktops.

How do I change that report so that it only shows drive C: and also includes Laptops?
1 ACCEPTED SOLUTION
Daniel_B
Lansweeper Alumni
Moved your post to this forum category. Please use the Report Center only for finished reports. Questions regarding reports can be posted under "Report requests and questions".

The report "Disk: Workstations less than 1 GB free HD" lists both desktop and laptops drives. In order to list only C: drives, add a filter criterion under tblDiskdrives.Caption, like in the following example.

Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetUnique,
tsysOS.OSname,
tblAssets.Description,
tblDiskdrives.Caption,
Cast(Cast(tblDiskdrives.Freespace As bigint) / 1024 / 1024 As numeric) As
free,
Cast(Cast(tblDiskdrives.Size As bigint) / 1024 / 1024 As numeric) As
[total size],
tblDiskdrives.Lastchanged As [last changed],
tsysOS.Image As icon
From tblAssets
Inner Join tblDiskdrives On tblAssets.AssetID = tblDiskdrives.AssetID
Inner Join tblOperatingsystem
On tblAssets.AssetID = tblOperatingsystem.AssetID
Inner Join tblComputersystem On tblAssets.AssetID = tblComputersystem.AssetID
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Where tblDiskdrives.Caption Like 'c:%' And Cast(Cast(tblDiskdrives.Freespace As
bigint) / 1024 / 1024 As numeric) < 1024 And Cast(Cast(tblDiskdrives.Size As
bigint) / 1024 / 1024 As numeric) <> 0 And tblComputersystem.Domainrole < 2
And tblDiskdrives.DriveType = 3 And tblAssetCustom.State = 1

View solution in original post

2 REPLIES 2
max204
Engaged Sweeper II
Thank you!
Daniel_B
Lansweeper Alumni
Moved your post to this forum category. Please use the Report Center only for finished reports. Questions regarding reports can be posted under "Report requests and questions".

The report "Disk: Workstations less than 1 GB free HD" lists both desktop and laptops drives. In order to list only C: drives, add a filter criterion under tblDiskdrives.Caption, like in the following example.

Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetUnique,
tsysOS.OSname,
tblAssets.Description,
tblDiskdrives.Caption,
Cast(Cast(tblDiskdrives.Freespace As bigint) / 1024 / 1024 As numeric) As
free,
Cast(Cast(tblDiskdrives.Size As bigint) / 1024 / 1024 As numeric) As
[total size],
tblDiskdrives.Lastchanged As [last changed],
tsysOS.Image As icon
From tblAssets
Inner Join tblDiskdrives On tblAssets.AssetID = tblDiskdrives.AssetID
Inner Join tblOperatingsystem
On tblAssets.AssetID = tblOperatingsystem.AssetID
Inner Join tblComputersystem On tblAssets.AssetID = tblComputersystem.AssetID
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Where tblDiskdrives.Caption Like 'c:%' And Cast(Cast(tblDiskdrives.Freespace As
bigint) / 1024 / 1024 As numeric) < 1024 And Cast(Cast(tblDiskdrives.Size As
bigint) / 1024 / 1024 As numeric) <> 0 And tblComputersystem.Domainrole < 2
And tblDiskdrives.DriveType = 3 And tblAssetCustom.State = 1