Comments on: Adding a Logo to Public Report Pages https://servicenowguru.com/ui-scripts-system-ui/adding-logo-public-report-pages/ ServiceNow Consulting Scripting Administration Development Thu, 07 Mar 2024 16:11:23 +0000 hourly 1 https://wordpress.org/?v=6.8.2 By: David https://servicenowguru.com/ui-scripts-system-ui/adding-logo-public-report-pages/#comment-8464 Fri, 14 Nov 2014 15:48:36 +0000 https://servicenowguru.wpengine.com/?p=3530#comment-8464 In reply to Marc Guy.

Would you happen to know how to add another button next to the “Export to PDF” button? I achieved to show a duplicated one but always shows at the very top of the form or the very bottom. Later on I would need to add the Excel export functionality. Thanks!

Sample:

addLoadEvent(addExportXLButton);

function addExportXLButton(){
if($(‘partialPage:theReport’) ){
$(‘partialPage:theReport’).insert({top: ”});
}
}

]]>
By: wes worek https://servicenowguru.com/ui-scripts-system-ui/adding-logo-public-report-pages/#comment-8463 Mon, 09 Dec 2013 23:15:07 +0000 https://servicenowguru.wpengine.com/?p=3530#comment-8463 has anyone got the report title to display on a published report in Calgary?

]]>
By: Mark Stanger https://servicenowguru.com/ui-scripts-system-ui/adding-logo-public-report-pages/#comment-8462 Tue, 23 Aug 2011 14:26:43 +0000 https://servicenowguru.wpengine.com/?p=3530#comment-8462 In reply to David Martin.

I’m not aware of a way to do that unfortunately. This technique works via client-side script so it is dependent on the report being viewed in the browser.

]]>
By: David Martin https://servicenowguru.com/ui-scripts-system-ui/adding-logo-public-report-pages/#comment-8461 Tue, 23 Aug 2011 14:17:50 +0000 https://servicenowguru.wpengine.com/?p=3530#comment-8461 In reply to Marc Guy.

Hi

We have a header and footer, this works great in the application and when using the printer friendly version.

Do you know if there is a way to add this functionality to a scheduled report? So when the report is sent via e-mail it includes the header and footer to the pdf file?

Thanks

]]>
By: Marc Guy https://servicenowguru.com/ui-scripts-system-ui/adding-logo-public-report-pages/#comment-8460 Wed, 08 Jun 2011 06:13:59 +0000 https://servicenowguru.wpengine.com/?p=3530#comment-8460 My last update on this topic, I managed to put some more details on the report footer using a UI Script and a script include, this adds the user running the report and the date/time as well.

If it actually printed when you use the print icon that would be even better but for some reason doesn’t :)

A) Set up the script include mentioned in the wiki here: http://wiki.service-now.com/index.php?title=Set_C

B) Create the ui script below:

 
addLoadEvent(addPublicReportFooter);
 

 
function addPublicReportFooter(){
 
//Check to make sure we're on the public report page
 
if($('partialPage:theReport')) //&& !$('reportform_control'))
 
{
 

 
var ajax = new GlideAjax('MyDateTimeAjax'); 
 
ajax.addParam('sysparm_name','nowDateTime');
 
ajax.getXMLWait();
 
var rightnow = ajax.getAnswer();
 

 
var title = document.getElementById('sysparm_title').value;
 
//Insert the footer with report title - who ran report - and date-time run
 
$('partialPage:theReport').insert({
 
bottom: '' + title + ' - Run by ' + g_user.userName + ' at ' + rightnow + ''
 
});
 
}
 
}
 

If anyone can figure out how to get this on prints that would be very cool and useful to a lot of people in my opinion but I’m done :)

]]>
By: Marc Guy https://servicenowguru.com/ui-scripts-system-ui/adding-logo-public-report-pages/#comment-8459 Wed, 01 Jun 2011 06:32:56 +0000 https://servicenowguru.wpengine.com/?p=3530#comment-8459 This may help in grabbing specific details from the actual report record itself, I recently was asked to add a footer to the bottom of the report, detailing the report title. I was able to grab the report title by grabbing the correct DOM element, script below:

 
addLoadEvent(addPublicReportFooter);
 

 
function addPublicReportFooter(){
 
//Check to make sure we're on the public report page
 
if($('partialPage:theReport')) //&& !$('reportform_control'))
 
{
 

 
var title = document.getElementById('sysparm_title').value;
 
// alert(title);
 
//Insert the footer
 
$('partialPage:theReport').insert({
 
bottom: '' + title +''
 
});
 
}
 
}
 
]]>
By: Mark Stanger https://servicenowguru.com/ui-scripts-system-ui/adding-logo-public-report-pages/#comment-8458 Thu, 05 May 2011 10:32:53 +0000 https://servicenowguru.wpengine.com/?p=3530#comment-8458 In reply to mathew.

See my response to Daniel’s question above. It’s possible with some advanced scripting, but I don’t have anything pre-built to do this and it would depend on the setup of the report. You’re probably on your own if you decide to pursue it.

]]>
By: mathew https://servicenowguru.com/ui-scripts-system-ui/adding-logo-public-report-pages/#comment-8457 Thu, 05 May 2011 10:29:32 +0000 https://servicenowguru.wpengine.com/?p=3530#comment-8457 is it possible to enter a coustomize text as a header by picking up any field values from the record

]]>
By: Mark Stanger https://servicenowguru.com/ui-scripts-system-ui/adding-logo-public-report-pages/#comment-8456 Thu, 05 May 2011 10:06:08 +0000 https://servicenowguru.wpengine.com/?p=3530#comment-8456 In reply to Jason.

You can. Just remove this section from the condition in the script…

&& !$('reportform_control')
]]>
By: Jason https://servicenowguru.com/ui-scripts-system-ui/adding-logo-public-report-pages/#comment-8455 Thu, 05 May 2011 09:56:47 +0000 https://servicenowguru.wpengine.com/?p=3530#comment-8455 Can this be done on internal reports as well? It’s not as necessary – I just think it looks cool. Thanks for the great tips and tricks. Keep them coming!

]]>