Lansweeper logo
Home Download Features Demo Buy now Help Support forum
 
    Most requested support articles:
  Lansweeper troubleshooting guide.
  The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)
  WMI Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
  How to configure the windows firewall using group policies.
  Support:  
 support@lansweeper.com  
Skype: Lansweeper  
  Mo-Fri 9h-17h CET  
Welcome Guest Search | Active Topics | Log In | Register

Untag as favorite
Device name link
Darth Jed
#1 Posted : Thursday, December 29, 2011 5:14:03 PM

Rank: Premium user

Groups: Premium Users, Member
Posts: 6
I probably have overlooked this somewhere, but what SQL code do you need to create a custom report that lists printer names that are clickable links to their detail pages? For example, I'm trying to create a report that will list the printer names in the first column, followed by all the other fields. If I look at Device: Printer Status, that report has the effect I'm looking for. When I build my report in a similar fashion, the displayname is not converted into a clickable link. Here's my code.

Select Top 1000000 tblCustDevices.Displayname, tblCustDevices.Ipaddress, tblCustDevices.Model, tblstate.Statename, tblCustDevices.LastSeen, tblCustDevices.DeviceKey, tblCustDevices.DeviceKey As DeviceKey1 From tblCustDevices Inner Join tblstate On tblCustDevices.State = tblstate.State Inner Join tsysDevicetypes On tsysDevicetypes.ItemType = tblCustDevices.Devicetype Inner Join web40AllIPLocationsDev On tblCustDevices.DeviceKey = web40AllIPLocationsDev.DeviceKey Where tblstate.Statename = 'active' And tblCustDevices.DeviceKey Like '%.%' And tblCustDevices.Devicetype = 16 Order By tblCustDevices.Displayname
Lansweeper
#2 Posted : Thursday, December 29, 2011 6:44:31 PM

Rank: Administration

Groups: Administration, Premium Users
Posts: 10,378
Please try the report below. To link the name to the device page the fields "Displayname" and "DeviceKey" must be included in your report and "Displayname" must be given the alias "Device Name".

Quote:
Select Top 1000000 tblCustDevices.Displayname As [Device Name], tblCustDevices.Ipaddress, tblCustDevices.Model, tblstate.Statename, tblCustDevices.LastSeen, tblCustDevices.DeviceKey From tblCustDevices Inner Join tblstate On tblCustDevices.State = tblstate.State Inner Join tsysDevicetypes On tsysDevicetypes.ItemType = tblCustDevices.Devicetype Inner Join web40AllIPLocationsDev On tblCustDevices.DeviceKey = web40AllIPLocationsDev.DeviceKey Where tblstate.Statename = 'active' And tblCustDevices.DeviceKey Like '%.%' And tblCustDevices.Devicetype = 16 Order By tblCustDevices.Displayname
Darth Jed
#3 Posted : Thursday, December 29, 2011 7:13:28 PM

Rank: Premium user

Groups: Premium Users, Member
Posts: 6
That's exactly what I was missing! Thank you!
Users browsing this topic
Guest
Untag as favorite
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Contact: E-mail Lansweeper - Skype : Lansweeper
Copyright 2004 - 2011 © Hemoco bvba