<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Reports... again]]></title><description><![CDATA[<p dir="auto">So, I've got the reports working.<br />
I am able to generate many different reports for different time periods now.<br />
It required some additional scripting, so I decided to share it with those who might need it.<br />
The idea behind the scripts is following.<br />
We generate XML files, which is called subreports. Each subreport have its own SQL query and generate its own TimeSeries graph.<br />
After subreports have been generated we list them in the main XML report and compile the main report from command line.</p>
<p dir="auto">Steps to teach your server to generate reports (tested on Ubuntu):</p>
<ol>
<li>Download packages</li>
</ol>
<pre><code>wget -r --no-parent https://svn.netxms.org/public/netxms/trunk/src/java/report-generator/
wget http://repo1.maven.org/maven2/net/sf/jasperreports/jasperreports/4.7.0/jasperreports-4.7.0.jar
</code></pre>
<ol start="2">
<li>Install required packages:</li>
</ol>
<pre><code>sudo apt-get install sendemail maven2
mvn install:install-file -DgroupId=jasperreports -DartifactId=jasperreports -Dversion=4.7.0 -Dpackaging=jar -Dfile=./jasperreports-4.7.0.jar
</code></pre>
<ol start="3">
<li>Edit pom.xml to remove unnecessary dependencies:</li>
</ol>
<pre><code>cd ./svn.netxms.org/public/netxms/trunk/src/java/report-generator/
nano pom.xml
</code></pre>
<ol start="4">
<li>Compile java package and copy it to your preferred location (I use /opt/netxms/java-lib/):</li>
</ol>
<pre><code>mvn clean package
cp ./svn.netxms.org/public/netxms/trunk/src/java/report-generator/target/report-generator.jar /opt/netxms/java-lib/
</code></pre>
<ol start="5">
<li>Add the following to your netxmsd.conf (modify for your installation):</li>
</ol>
<pre><code>JavaPath=/usr/bin/java
JavaLibraryDirectory=/opt/netxms/java-lib
JDBCDriver=org.postgresql.Driver
JDBCUrl=jdbc:postgresql://localhost/netxms
</code></pre>
<p dir="auto">Steps to actually generate reports:</p>
<ol>
<li>Download script (<em><a href="http://xml-generation.pl" rel="nofollow ugc">xml-generation.pl</a></em>, <em><a href="http://createMainXML.pm" rel="nofollow ugc">createMainXML.pm</a></em>, <em><a href="http://createSubReport.pm" rel="nofollow ugc">createSubReport.pm</a></em>)</li>
<li>Install perl</li>
<li>Modify SQL subqueries, descriptions, conditions, folder (where xml files should be stored) in the <em><a href="http://xml-generation.pl" rel="nofollow ugc">xml-generation.pl</a></em> file to suit your needs. (If you are not using PostgreSQL you should also modify the DBI connection and query in <em><a href="http://createSubReport.pm" rel="nofollow ugc">createSubReport.pm</a></em>)</li>
<li>Run the <em><a href="http://xml-generation.pl" rel="nofollow ugc">xml-generation.pl</a></em> script. It will generate subreports named <em>&lt;node_name&gt;-&lt;description&gt;-&lt;interval&gt;.jrxml</em> and main report named <em>&lt;interval&gt;.jrxml</em></li>
<li>Compile the report:</li>
</ol>
<pre><code>"/usr/bin/java" -cp "/opt/netxms/java-lib/report-generator.jar" org.netxms.report.Generator "/etc/netxmsd.conf" "/opt/xml-reports/hourly.jrxml" "/opt/reports/hourly.output"
</code></pre>
<ol start="6">
<li>Convert it to pdf:</li>
</ol>
<pre><code>"/usr/bin/java" -cp "/opt/netxms/java-lib/report-generator.jar" org.netxms.report.Exporter "/opt/reports/hourly.output" "/opt/reports/hourly.pdf"
</code></pre>
<ol start="7">
<li>And send it to your e-mail:</li>
</ol>
<pre><code>sendemail -f "sender@example.com" -t "recipient@example.com" -m "Hourly report" -u "Report" -a "/opt/reports/hourly.pdf"
</code></pre>
<p dir="auto">Best regards,<br />
Rostyslav</p>
<hr />
<p dir="auto"><a href="/assets/uploads/files/smf/0000000001016-xml-generation.pl">xml-generation.pl</a></p>
<p dir="auto"><a href="/assets/uploads/files/smf/0000000001017-createMainXML.pm">createMainXML.pm</a></p>
<p dir="auto"><a href="/assets/uploads/files/smf/0000000001018-createSubReport.pm">createSubReport.pm</a></p>
]]></description><link>https://forum.netxms.org/topic/2136/reports...-again</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 09:18:08 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/2136.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 17 Jan 2013 14:57:01 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Reports... again on Mon, 12 May 2014 08:39:39 GMT]]></title><description><![CDATA[<p dir="auto">I've rewritten the script to PHP. Now it is much more cleaner and easier to understand.<br />
Link to github: <a href="https://github.com/frostyslav/netxms-report-generator" rel="nofollow ugc">https://github.com/frostyslav/netxms-report-generator</a></p>
]]></description><link>https://forum.netxms.org/post/13871</link><guid isPermaLink="true">https://forum.netxms.org/post/13871</guid><dc:creator><![CDATA[rostyslav]]></dc:creator><pubDate>Mon, 12 May 2014 08:39:39 GMT</pubDate></item><item><title><![CDATA[Reply to Reports... again on Mon, 02 Dec 2013 17:45:58 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/alk" aria-label="Profile: alk">@<bdi>alk</bdi></a> said in <a href="/post/12062">Reports... again</a>:</p>
<blockquote>
<p dir="auto">I highly recommend you to use Jaspersoft Studio (<a href="http://community.jaspersoft.com/project/jaspersoft-studio" rel="nofollow ugc">http://community.jaspersoft.com/project/jaspersoft-studio</a>) instead of iReport</p>
</blockquote>
<p dir="auto">Hi Victor, ill give a try, thanks!</p>
<p dir="auto">Greetings.</p>
]]></description><link>https://forum.netxms.org/post/12063</link><guid isPermaLink="true">https://forum.netxms.org/post/12063</guid><dc:creator><![CDATA[yshiro]]></dc:creator><pubDate>Mon, 02 Dec 2013 17:45:58 GMT</pubDate></item><item><title><![CDATA[Reply to Reports... again on Mon, 02 Dec 2013 15:51:33 GMT]]></title><description><![CDATA[<p dir="auto">I highly recommend you to use Jaspersoft Studio (<a href="http://community.jaspersoft.com/project/jaspersoft-studio" rel="nofollow ugc">http://community.jaspersoft.com/project/jaspersoft-studio</a>) instead of iReport</p>
]]></description><link>https://forum.netxms.org/post/12062</link><guid isPermaLink="true">https://forum.netxms.org/post/12062</guid><dc:creator><![CDATA[alk]]></dc:creator><pubDate>Mon, 02 Dec 2013 15:51:33 GMT</pubDate></item><item><title><![CDATA[Reply to Reports... again on Mon, 02 Dec 2013 15:35:57 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/phonix786" aria-label="Profile: phonix786">@<bdi>phonix786</bdi></a> said in <a href="/post/12054">Reports... again</a>:</p>
<blockquote>
<p dir="auto">Is there any external tools by which we can generate reports on Windows Installation?</p>
</blockquote>
<p dir="auto">Hi phonix, i´m using <a href="http://community.jaspersoft.com/project/ireport-designer" rel="nofollow ugc">http://community.jaspersoft.com/project/ireport-designer</a>, with iReport you can generate a jrxml file extension, this file will be used by netxms when we succesfully install reports on netxms with windows server.</p>
<p dir="auto">I have some reports created, like capacity of switches.</p>
<p dir="auto">Greetings.</p>
]]></description><link>https://forum.netxms.org/post/12061</link><guid isPermaLink="true">https://forum.netxms.org/post/12061</guid><dc:creator><![CDATA[yshiro]]></dc:creator><pubDate>Mon, 02 Dec 2013 15:35:57 GMT</pubDate></item><item><title><![CDATA[Reply to Reports... again on Sat, 30 Nov 2013 10:17:52 GMT]]></title><description><![CDATA[<p dir="auto">Is there any external tools by which we can generate reports on Windows Installation?</p>
]]></description><link>https://forum.netxms.org/post/12054</link><guid isPermaLink="true">https://forum.netxms.org/post/12054</guid><dc:creator><![CDATA[phonix786]]></dc:creator><pubDate>Sat, 30 Nov 2013 10:17:52 GMT</pubDate></item><item><title><![CDATA[Reply to Reports... again on Mon, 25 Nov 2013 13:19:09 GMT]]></title><description><![CDATA[<p dir="auto">Hi Gentlemen</p>
<p dir="auto">I was not able to get reports working on a windows machine so far, too. Could you please post a short guide on how to implement reports module on windows machines?</p>
<p dir="auto">Thanks in advance and best regards<br />
Florian Mialki</p>
]]></description><link>https://forum.netxms.org/post/11996</link><guid isPermaLink="true">https://forum.netxms.org/post/11996</guid><dc:creator><![CDATA[mialkfl]]></dc:creator><pubDate>Mon, 25 Nov 2013 13:19:09 GMT</pubDate></item><item><title><![CDATA[Reply to Reports... again on Sat, 09 Nov 2013 05:37:00 GMT]]></title><description><![CDATA[<p dir="auto">Has anyone configured reports with NetXMS server installed on a windows machine?</p>
]]></description><link>https://forum.netxms.org/post/11756</link><guid isPermaLink="true">https://forum.netxms.org/post/11756</guid><dc:creator><![CDATA[sohgnar]]></dc:creator><pubDate>Sat, 09 Nov 2013 05:37:00 GMT</pubDate></item></channel></rss>