→ 🚀What's New? Join Us for the Fall Product Launch! Register Now !

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Kreg
Engaged Sweeper II
Hi all !

I tried to create a query to check the space disk for all my devices.
And when I test my query I get an error like

error during getting report
Invalid object name 'web50rep35df5261c85e45b597617557f81d0c06'


Here is my query :

Select Top 1000000 tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.AssetName,
tblAssets.AssetID,
tblAssets.Username,
tsysIPLocations.IPLocation,
tblADusers.Firstname,
tblADusers.Lastname,
tblADusers.email,
tblOperatingsystem.Caption,
tblAssets.Lastseen,
tblAssets.Firstseen,
tblBIOS.Manufacturer,
tblAssetCustom.Model,
tblBIOS.SerialNumber,
tblstate.Statename,
tblADComputers.OU,
tblDiskdrives.Caption,
tblDiskdrives.Volumename,
Round(tblDiskDrives.Size / '1073741824', 2) As Size,
Round(tblDiskDrives.Freespace / '1073741824', 2) As FreeSpace,
Round(((tblDiskDrives.Size - tblDiskDrives.Freespace) /
'1073741824'), 2) As 'Espace Occupe'
From tblAssets
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Left Outer Join tsysIPLocations On tblAssets.IPNumeric >=
tsysIPLocations.StartIP And tblAssets.IPNumeric <= tsysIPLocations.EndIP
Left Join tblADusers On tblADusers.Username = tblAssets.Username And
tblADusers.Userdomain = tblAssets.Userdomain
Inner Join tblOperatingsystem
On tblAssets.AssetID = tblOperatingsystem.AssetID
Inner Join tblBIOS On tblAssets.AssetID = tblBIOS.AssetID
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tblstate On tblstate.State = tblAssetCustom.State
Inner Join tblADComputers On tblAssets.AssetID = tblADComputers.AssetID
Inner Join tblDiskdrives On tblAssets.AssetID = tblDiskdrives.AssetID

Order By tsysIPLocations.IPLocation


Did I forget something?

NB : Lansweeper version 5.0.0.41

Thanks !
Kreg
3 REPLIES 3
Hemoco
Lansweeper Alumni
Kreg wrote:
NB : Lansweeper version 5.0.0.41

There were bugs in older versions of the report builder. We would also recommend upgrading to Lansweeper 5.0.0.78 by following the instructions on page 165 and beyond of our online documentation: http://www.lansweeper.com/documentation.pdf
tech4him
Engaged Sweeper II
I cut and pasted your query SQL into our instance and received the following:

Error while saving report: "Column names in each view or function must be unique. Column name 'Caption' in view or function 'web50rep411820f1985c435c87bacfe4de5378fe' is specified more than once."

I modified the query to give aliases to the two Caption columns and ran the report just fine. Here is the modified SQL:


Select Top 1000000 tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.AssetName,
tblAssets.AssetID,
tblAssets.Username,
tsysIPLocations.IPLocation,
tblADusers.Firstname,
tblADusers.Lastname,
tblADusers.email,
tblOperatingsystem.Caption As OSCaption,
tblAssets.Lastseen,
tblAssets.Firstseen,
tblBIOS.Manufacturer,
tblAssetCustom.Model,
tblBIOS.SerialNumber,
tblState.Statename,
tblADComputers.OU,
tblDiskdrives.Caption As DriveCaption,
tblDiskdrives.Volumename,
Round(tblDiskdrives.Size / '1073741824', 2) As Size,
Round(tblDiskdrives.Freespace / '1073741824', 2) As FreeSpace,
Round(((tblDiskdrives.Size - tblDiskdrives.Freespace) / '1073741824'),
2) As 'Espace Occupe'
From tblAssets
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Left Outer Join tsysIPLocations On tblAssets.IPNumeric >=
tsysIPLocations.StartIP And tblAssets.IPNumeric <= tsysIPLocations.EndIP
Left Join tblADusers On tblADusers.Username = tblAssets.Username And
tblADusers.Userdomain = tblAssets.Userdomain
Inner Join tblOperatingsystem
On tblAssets.AssetID = tblOperatingsystem.AssetID
Inner Join tblBIOS On tblAssets.AssetID = tblBIOS.AssetID
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tblState On tblState.State = tblAssetCustom.State
Inner Join tblADComputers On tblAssets.AssetID = tblADComputers.AssetID
Inner Join tblDiskdrives On tblAssets.AssetID = tblDiskdrives.AssetID
Order By tsysIPLocations.IPLocation
Kreg
Engaged Sweeper II
Hi there,

No idea regarding this error ?
Thanks !