cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
lukee20
Engaged Sweeper
Hi,

I'm trying to create a custom report that lists the Computername as well as the full Username ie. John Doe - by using the tblAdusers.

However when I try to run the report the Report Console simply hangs - Does anyone know a solution?

Thanks!
5 REPLIES 5
Hemoco
Lansweeper Alumni
I've attached the correct report in the previous post.
Hemoco
Lansweeper Alumni
You didn't link tbladusers to table tblcomputers

Select Top 1000000 dbo.tblComputers.Computername,
dbo.tblComputers.ComputerUnique, Web40OSName.OSname,
dbo.tblOperatingsystem.Description, dbo.tblDiskdrives.Caption,
Cast(Cast(dbo.tblDiskdrives.Freespace As bigint) / 4096 / 4096 As numeric) As
Free, Cast(Cast(dbo.tblDiskdrives.Size As bigint) / 4096 / 4096 As numeric) As
[Total size], dbo.tblDiskdrives.Lastchanged As [Last changed],
Web40OSName.Compimage As icon, tblADusers.Displayname
From dbo.tblComputers Inner Join
dbo.tblDiskdrives On dbo.tblComputers.Computername =
dbo.tblDiskdrives.Computername Inner Join
dbo.tblOperatingsystem On dbo.tblComputers.Computername =
dbo.tblOperatingsystem.Computername Inner Join
dbo.web40ActiveComputers On dbo.tblComputers.Computername =
dbo.web40ActiveComputers.Computername Inner Join
Web40OSName On Web40OSName.Computername = dbo.tblComputers.Computername
Inner Join
tblComputersystem On dbo.tblComputers.Computername =
tblComputersystem.Computername Inner Join
tblADusers On tblADusers.Username = dbo.tblComputers.Username And
tblADusers.Userdomain = dbo.tblComputers.Userdomain
Where Cast(Cast(dbo.tblDiskdrives.Freespace As bigint) / 4096 / 4096 As numeric)
< 4096 And Cast(Cast(dbo.tblDiskdrives.Size As bigint) / 4096 / 4096
As numeric) <> 0 And tblComputersystem.Domainrole < 2 And
dbo.tblDiskdrives.DriveType = '3'
Order By Cast(Cast(dbo.tblDiskdrives.Freespace As bigint) / 4096 /
4096 As numeric), dbo.tblDiskdrives.Caption
lukee20
Engaged Sweeper
Lansweeper wrote:
You didn't link tbladusers to table tblcomputers

OK thanks - but how do I do that?? Sorry I do not know a lot about SQL, and I can't seem to find any doco on building reports???
Hemoco
Lansweeper Alumni
Please post the sql of your report.
lukee20
Engaged Sweeper
Lansweeper wrote:
Please post the sql of your report.


Select Top 1000000 dbo.tblComputers.Computername, dbo.tblComputers.ComputerUnique, Web40OSName.OSname, dbo.tblOperatingsystem.Description, dbo.tblDiskdrives.Caption, Cast(Cast(dbo.tblDiskdrives.Freespace As bigint) / 4096 / 4096 As numeric) As Free, Cast(Cast(dbo.tblDiskdrives.Size As bigint) / 4096 / 4096 As numeric) As [Total size], dbo.tblDiskdrives.Lastchanged As [Last changed], Web40OSName.Compimage As icon, tblADusers.Displayname From dbo.tblComputers Inner Join dbo.tblDiskdrives On dbo.tblComputers.Computername = dbo.tblDiskdrives.Computername Inner Join dbo.tblOperatingsystem On dbo.tblComputers.Computername = dbo.tblOperatingsystem.Computername Inner Join dbo.web40ActiveComputers On dbo.tblComputers.Computername = dbo.web40ActiveComputers.Computername Inner Join Web40OSName On Web40OSName.Computername = dbo.tblComputers.Computername Inner Join tblComputersystem On dbo.tblComputers.Computername = tblComputersystem.Computername, tblADusers Where Cast(Cast(dbo.tblDiskdrives.Freespace As bigint) / 4096 / 4096 As numeric) < 4096 And Cast(Cast(dbo.tblDiskdrives.Size As bigint) / 4096 / 4096 As numeric) <> 0 And tblComputersystem.Domainrole < 2 And dbo.tblDiskdrives.DriveType = '3' Order By Cast(Cast(dbo.tblDiskdrives.Freespace As bigint) / 4096 / 4096 As numeric), dbo.tblDiskdrives.Caption