How to put hyperlinks in a custom SQL built report in KACE K1000?
Hi, I'm trying to create report which has machine names in it. I'd like to make the names links to the pages of those machines in the inventory so a user can easily click on the machine name when looking at the report to be directed to the machine's inventory page. I've already figured out how to construct the link but KACE doesn't allow inserting HTML tags into the custom SQL codes. It converts the special characters "<>' to their HTML encodes. Does anyone know how I can make KACE to create links for me?
I tried this SQL code but KACE still doesn't make it a clickable link:
SELECT CONCAT('http://kbox.it.ed.nyu.edu/adminui/machine.php?ID=',MACHINE.ID) as LINK FROM MACHINE
This is what I got from the HTML export:
Thanks!
3 Comments
[ + ] Show comments
Answers (1)
Please log in to answer
Posted by:
h2opolo25
9 years ago
CONCAT('http://KACEBOXADDRESS/userui/ticket.php?ID=',HD_TICEKT.ID) as LINK
This is for tickets. You can do the same with whatever else. Just look at the address when browsing to the machine (with /userui added) and then substitute HD_TICKET.ID with MACHINE.ID, etc...
Comments:
-
But this only creates the address, it doesn't really make it a link. I want to make the field clickable so the user can click on the machine name and be redirected to the machine information page just like how Kace itself put links into it's wizard reports. - goodinges 9 years ago
-
What are you exporting the report to? If you do html or pdf then the link will work. - h2opolo25 9 years ago
-
I am doing HTML. I tried your code several times but still to no avail. I attached a picture to my original question and put the query there. Could you take a look at it? Thanks - goodinges 9 years ago
I am a novice at SQL, but would we maybe need to have an <a href="http...> somewhere? - reneed33 9 years ago
We have used several CONCATs to try and make this happen, we get a valid URL, but it doesn't show as a link.
When we run reports using the Wizard, we get clickable links for the ticket number; if we schedule the same report, we get File links instead of the URL. This, of course, doesn't work.
If we just knew what magic phrase the wizard uses to tell it to do a URL that would be fine with us.
KACE support says this is "normal" since the URL is determined by the user running the report (I guess in a scheduled report it is the local system, not an actual user?!) - wmwooten 9 years ago
CONCAT('<a href=','http://KACEBOX/userui/ticket.php?ID=',HD_TICKET.ID,">",HD_TICKET.ID,"</a>") as LINK, - JasonEgg 8 years ago