cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
harringg
Champion Sweeper
I've got the following report for listing the battery replacement schedule for our server UPS batteries. The DisplayName column on the web interface is static, is there a way to make it a hyperlink, like other reports have? So I can jump to that UPS from the report page?

SELECT TOP 1000000 tblCustDevices.Displayname,
tblCustDevices.Serialnumber,
tblCustDevices.PurchaseDate,
tblCustDevices.Warrantydate AS [Battery Replacement Due],
CASE
WHEN tblCustDevices.Warrantydate < Getdate() + 90
AND tblCustDevices.Warrantydate > Getdate() THEN
'UPS Battery Due Soon'
WHEN tblCustDevices.Warrantydate < Getdate() THEN
'Replace-Replace-Replace'
WHEN tblCustDevices.Warrantydate > Getdate() THEN
'Battery-Current'
END AS [Battery Status],
tblCustDevices.Location
FROM tblCustDevices
WHERE tblCustDevices.Displayname LIKE '%1500%'
ORDER BY tblCustDevices.Displayname
1 ACCEPTED SOLUTION
Hemoco
Lansweeper Alumni
You have to include the "DeviceKey" and "Displayname" fields in your report and assign the alias "Device name" to the "Displayname" field.


Modified report:

Select Top 1000000 tblCustDevices.DeviceKey, tblCustDevices.Displayname As
[Device name], tblCustDevices.Serialnumber, tblCustDevices.PurchaseDate,
tblCustDevices.Warrantydate As [Battery Replacement Due], Case
When tblCustDevices.Warrantydate < GetDate() + 90 And
tblCustDevices.Warrantydate > GetDate() Then 'UPS Battery Due Soon'
When tblCustDevices.Warrantydate < GetDate() Then 'Replace-Replace-Replace'
When tblCustDevices.Warrantydate > GetDate() Then 'Battery-Current'
End As [Battery Status], tblCustDevices.Location
From tblCustDevices
Where tblCustDevices.Displayname Like '%1500%'
Order By tblCustDevices.Displayname

View solution in original post

2 REPLIES 2
harringg
Champion Sweeper
Thanks. That's what I was looking for.
Hemoco
Lansweeper Alumni
You have to include the "DeviceKey" and "Displayname" fields in your report and assign the alias "Device name" to the "Displayname" field.


Modified report:

Select Top 1000000 tblCustDevices.DeviceKey, tblCustDevices.Displayname As
[Device name], tblCustDevices.Serialnumber, tblCustDevices.PurchaseDate,
tblCustDevices.Warrantydate As [Battery Replacement Due], Case
When tblCustDevices.Warrantydate < GetDate() + 90 And
tblCustDevices.Warrantydate > GetDate() Then 'UPS Battery Due Soon'
When tblCustDevices.Warrantydate < GetDate() Then 'Replace-Replace-Replace'
When tblCustDevices.Warrantydate > GetDate() Then 'Battery-Current'
End As [Battery Status], tblCustDevices.Location
From tblCustDevices
Where tblCustDevices.Displayname Like '%1500%'
Order By tblCustDevices.Displayname