<script custom-tag="" type="application/ld+json">{"@context":"https://schema.org","@type":"TechArticle","headline":"Generate and embed a report is not working in UI page","image":"http://support.servicenow.com/29f1d2661baf6010cafa53d8624bcb43.iix","author":{"name":"ServiceNow Support","url":"http://support.servicenow.com/now"},"keywords":"ServiceNow, NowSupport public Knowledge Base articles, Support and Troubleshooting,KB0819321,Embed report, Generate and embed a report\r\nGenerate and embed a report is not working in UI page\r\n","wordcount":"190","publisher":"ServiceNow","url":"https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0819321","datePublished":"2020-03-27","dateCreated":"2020-03-27","dateModified":"2024-04-08","description":"<h2>Generate and embed a report is not working in UI page</h2><br/><div style=\"overflow-x:auto\"><article><div ><h3 >Issue </h3><section><p>The reports can be generated and embed (list report) from UI ","articleBody":"<h2>Generate and embed a report is not working in UI page</h2><br/><div style=\"overflow-x:auto\"><article><div ><h3 >Issue </h3><section><p>The reports can be generated and embed (list report) from UI page as per below documentation</p>\r\n<p><a href=\"https://docs.servicenow.com/csh?topicname&#61;c_EmbeddingReportsInJelly.html&amp;version&#61;latest\" rel=\"nofollow\">https://docs.servicenow.com/csh?topicname&#61;c_EmbeddingReportsInJelly.html&amp;version&#61;latest</a></p>\r\n<p>It is observed that the generate and embed report works fine in the Madrid version but does not work in Newyork or Orlando version.</p>\r\n<p>The UI page generate and embed script works fine for &#39;bar&#39; chart type but throws the above error for &#39;list&#39; in NY and Orlando versions</p>\r\n<p><span style=\"font-size: 18pt;\">Steps to Reproduce</span></p>\r\n<p>1. Copy the code from the below documentation link and click on the Try it on UI page<br /><a href=\"https://docs.servicenow.com/csh?topicname&#61;c_EmbeddingReportsInJelly.html&amp;version&#61;latest\" rel=\"nofollow\">https://docs.servicenow.com/csh?topicname&#61;c_EmbeddingReportsInJelly.html&amp;version&#61;latest</a></p>\r\n<p>2. Observe that it works fine for Bar chart but it throws NPE error for list report.</p></section></div><div ><h3 >Release</h3><section><p>Newyork and Orlando</p></section></div><div ><h3 >Resolution</h3><section><p>1. Please modify the script as below and the issue would be resolved<br />Modifications:<br />Existing filed: sysparm_field<br />Replace with : sysparm_field_list<br /><br /><br /></p>\r\n<pre><code>&lt;?xml version&#61;&#34;1.0&#34; encoding&#61;&#34;utf-8&#34;?&gt;<br />&lt;j:jelly trim&#61;&#34;false&#34; xmlns:j&#61;&#34;jelly:core&#34; xmlns:g&#61;&#34;glide&#34; xmlns:j2&#61;&#34;null&#34; xmlns:g2&#61;&#34;null&#34;&gt;<br />&lt;g:inline template&#61;&#34;reporting_includes.xml&#34; /&gt;<br />&lt;g:requires name&#61;&#34;scripts/GlideV2ChartingIncludes.js&#34; includes&#61;&#34;true&#34;/&gt;<br />&lt;div id&#61;&#34;gr1&#34; style&#61;&#34;height:300px;width:300px;&#34; /&gt;<br />&lt;script&gt;<br />var params &#61; {sysparm_title: &#34;Dashboards&#34;, sysparm_field_list: &#34;owner&#34;, sysparm_type: &#34;list&#34;, sysparm_table: &#34;pa_dashboards&#34;};<br />var div &#61; $j(&#34;#gr1&#34;);<br />embedReportByParams(div, params);<br />&lt;/script&gt;<br />&lt;/j:jelly&gt;<br /></code></pre>\r\n<p><br /><br /><br /></p></section></div></article></div>"}</script>
  Loading...