cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
krainbolt
Engaged Sweeper
We are trying to create a report which will display all assets for each department. We want the asset name and employee name to be clickable, as well as display information about the asset or employee when you hover the mouse cursor over the name.

We were able to accomplish this with the following SQL code, however we need to hide Userdomain and Username columns. Is this possible without breaking the hyperlinks and pop-up information for each name?

Select Top 1000000 tblADusers.Department,
tblADusers.Displayname,
tblAssets.AssetName,
tblAssets.AssetID,
tblADusers.Userdomain,
tblADusers.Username
From tblADusers
Inner Join tblAssetUserRelations On tblADusers.Username =
tblAssetUserRelations.Username And tblADusers.Userdomain =
tblAssetUserRelations.Userdomain
Inner Join tblAssets On tblAssets.AssetID = tblAssetUserRelations.AssetID
Where tblADusers.Userdomain Is Not Null And tblADusers.Username Is Not Null And
tblAssetUserRelations.Type = 200
Order By tblADusers.Department,
tblADusers.Displayname



Thank you for any guidance you can provide.
1 ACCEPTED SOLUTION
Daniel_B
Lansweeper Alumni
The Select part of the SQL statement will define which columns you see in the result of the report. There are only few exceptions (i.e. tblAssets.AssetID which is used to generate hyperlinks to your assets). These are caused by the Lansweeper web console. There is no function to hide columns after the report has been generated.

What you could do is to export the result as Excel file and delete these columns.

View solution in original post

3 REPLIES 3
Daniel_B
Lansweeper Alumni
The Select part of the SQL statement will define which columns you see in the result of the report. There are only few exceptions (i.e. tblAssets.AssetID which is used to generate hyperlinks to your assets). These are caused by the Lansweeper web console. There is no function to hide columns after the report has been generated.

What you could do is to export the result as Excel file and delete these columns.
krainbolt
Engaged Sweeper
I realize the Username and Userdomain are used to form a unique identifier - this is why we are referencing them in the SQL statement. We just need to hide these columns in the generated report.
Daniel_B
Lansweeper Alumni
Username and Userdomain form a unique identifier. Without these, a link to a single user's page can't be created on the report result page.