chaley wrote:
However I keep getting errors that some of the tables dont exist such as tblComputers. I tried to rename it, but ran into other errors.
You are trying to run a 4.2 report in Lansweeper 5.0, which will not work. Lansweeper 5.0 has a different database structure. A sample 5.0 report can be seen below. We did not include software information, as including both software and disks will lead to duplication. For software, use the built-in report “Software: List of software by computer”. Most notable 5.0 database changes:
Tblcomputers -> tblassets
Tblcomputers.computername -> tblassets.assetid
Tblcompcustom -> tblassetcustom
Tblcustdevices -> tblassets
Tblcustdevices.devicekey -> tblassets.assetunique
All other tables: computername -> assetid
Select Top 1000000 tsysOS.Image As icon,
tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Domain,
TsysChassisTypes.ChassisName,
tblAssetCustom.Manufacturer,
tblAssetCustom.Model,
tsysIPLocations.IPLocation,
tsysOS.OSname,
tblOperatingsystem.Caption As FullOSname,
tblAssets.SP,
tblOperatingsystem.InstallDate,
tblOperatingsystem.SerialNumber,
tblAssets.Username,
tblAssets.Userdomain,
tblAssetCustom.Serialnumber As AssetTag,
tblAssets.Memory,
tblAssets.Processor,
tblNetwork.Description As NIC,
tblNetwork.IPAddress,
tblNetwork.MACaddress,
tblDiskdrives.Caption As [Disk],
Ceiling(tblDiskdrives.Freespace / 1024 / 1024) As FreeMB,
Ceiling(tblDiskdrives.Size / 1024 / 1024) As TotalMB,
tblAssets.Firstseen,
tblAssets.Lastseen
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysOS On tsysOS.OScode = tblAssets.OScode
Inner Join tblSystemEnclosure
On tblAssets.AssetID = tblSystemEnclosure.AssetID
Inner Join TsysChassisTypes On TsysChassisTypes.Chassistype =
tblSystemEnclosure.ChassisTypes
Left Outer Join tsysIPLocations On tblAssets.IPNumeric >=
tsysIPLocations.StartIP And tblAssets.IPNumeric <= tsysIPLocations.EndIP
Inner Join tblOperatingsystem On tblOperatingsystem.AssetID =
tblAssets.AssetID
Inner Join tblNetwork On tblAssets.AssetID = tblNetwork.AssetID
Inner Join tblDiskdrives On tblAssets.AssetID = tblDiskdrives.AssetID
Where Ceiling(tblDiskdrives.Size / 1024 / 1024) <> 0 And tblAssetCustom.State =
1 And tblNetwork.IPEnabled = 1 And tblDiskdrives.DriveType = 3
Order By tblAssets.Domain,
tblAssets.AssetName,
[Disk]
chaley wrote:
I would also like to add installed drives such as CD's and Floppy's if possible.
You cannot include all of this information in a single report, as this will lead to duplication. You will need to build a separate report based on tblCDROMDrive/tblFloppy.