
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-08-2017 11:34 PM
Hello. I found a report to list mac addresses and added the portable battery and IPLocation at the request of managment to try and output all laptops asset name, domain, network card, mac addresses, ip, last changed, userID, IPlocation and got a good output. When i tried adding first and last name by editing and double clicking tblADusers and selecting First and Last names, i get tons of results, exceptions and errors. How can i add that to the report?
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetUnique,
tblAssets.Domain,
tblNetwork.Description As [Network Card],
tblNetwork.MACaddress,
tsysOS.Image As icon,
tblNetwork.IPAddress,
tblNetwork.Lastchanged,
tblAssets.Username,
tblPortableBattery.Win32_PortableBatteryid,
tsysIPLocations.IPLocation
From tblAssets
Inner Join tblNetwork On tblAssets.AssetID = tblNetwork.AssetID
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Inner Join tblPortableBattery
On tblAssets.AssetID = tblPortableBattery.AssetID
Inner Join tsysIPLocations On tsysIPLocations.LocationID =
tblAssets.LocationID
Where tblNetwork.IPEnabled = 1 And tblAssetCustom.State = 1
Order By tblAssets.AssetName
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetUnique,
tblAssets.Domain,
tblNetwork.Description As [Network Card],
tblNetwork.MACaddress,
tsysOS.Image As icon,
tblNetwork.IPAddress,
tblNetwork.Lastchanged,
tblAssets.Username,
tblPortableBattery.Win32_PortableBatteryid,
tsysIPLocations.IPLocation
From tblAssets
Inner Join tblNetwork On tblAssets.AssetID = tblNetwork.AssetID
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Inner Join tblPortableBattery
On tblAssets.AssetID = tblPortableBattery.AssetID
Inner Join tsysIPLocations On tsysIPLocations.LocationID =
tblAssets.LocationID
Where tblNetwork.IPEnabled = 1 And tblAssetCustom.State = 1
Order By tblAssets.AssetName
Solved! Go to Solution.
Labels:
- Labels:
-
Report Center
1 ACCEPTED SOLUTION

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-09-2017 07:27 PM
If you want to add the database table tblADusers to your report, you will have to create a left join on Username and Userdomain as seen in the report below.
Instructions for adding this report to your Lansweeper installation can be found here. If you are interested in building or modifying reports, we do recommend:
Instructions for adding this report to your Lansweeper installation can be found here. If you are interested in building or modifying reports, we do recommend:
- Reviewing some SQL tutorials, as the Lansweeper report builder is a standard SQL editor. If you know SQL, you know how to build Lansweeper reports as well. This seems like a good tutorial.
- Making use of our database dictionary, which explains in great detail what each database table and field stores. More information on the dictionary can be found here.
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetUnique,
tblAssets.Domain,
tblNetwork.Description As [Network Card],
tblNetwork.MACaddress,
tsysOS.Image As icon,
tblNetwork.IPAddress,
tblNetwork.Lastchanged,
tblAssets.Username,
tblPortableBattery.Win32_PortableBatteryid,
tsysIPLocations.IPLocation,
tblADusers.Firstname,
tblADusers.Lastname
From tblAssets
Inner Join tblNetwork On tblAssets.AssetID = tblNetwork.AssetID
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Inner Join tblPortableBattery
On tblAssets.AssetID = tblPortableBattery.AssetID
Inner Join tsysIPLocations On tsysIPLocations.LocationID =
tblAssets.LocationID
Left Join tblADusers On tblADusers.Username = tblAssets.Username And
tblADusers.Userdomain = tblAssets.Userdomain
Where tblNetwork.IPEnabled = 1 And tblAssetCustom.State = 1
Order By tblAssets.AssetName
2 REPLIES 2

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-09-2017 07:42 PM
Thank you!

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-09-2017 07:27 PM
If you want to add the database table tblADusers to your report, you will have to create a left join on Username and Userdomain as seen in the report below.
Instructions for adding this report to your Lansweeper installation can be found here. If you are interested in building or modifying reports, we do recommend:
Instructions for adding this report to your Lansweeper installation can be found here. If you are interested in building or modifying reports, we do recommend:
- Reviewing some SQL tutorials, as the Lansweeper report builder is a standard SQL editor. If you know SQL, you know how to build Lansweeper reports as well. This seems like a good tutorial.
- Making use of our database dictionary, which explains in great detail what each database table and field stores. More information on the dictionary can be found here.
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetUnique,
tblAssets.Domain,
tblNetwork.Description As [Network Card],
tblNetwork.MACaddress,
tsysOS.Image As icon,
tblNetwork.IPAddress,
tblNetwork.Lastchanged,
tblAssets.Username,
tblPortableBattery.Win32_PortableBatteryid,
tsysIPLocations.IPLocation,
tblADusers.Firstname,
tblADusers.Lastname
From tblAssets
Inner Join tblNetwork On tblAssets.AssetID = tblNetwork.AssetID
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Inner Join tblPortableBattery
On tblAssets.AssetID = tblPortableBattery.AssetID
Inner Join tsysIPLocations On tsysIPLocations.LocationID =
tblAssets.LocationID
Left Join tblADusers On tblADusers.Username = tblAssets.Username And
tblADusers.Userdomain = tblAssets.Userdomain
Where tblNetwork.IPEnabled = 1 And tblAssetCustom.State = 1
Order By tblAssets.AssetName
