<?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[How to define variable in template]]></title><description><![CDATA[<p>I am generating PDF and I have to add page break in PDF and I am able to do that but at last bank page is coming because i have used page break in the end of for loop</p>
<p>So, I will add page break option at the start from the second iteration of each loop, in this I will display remove my last black page</p>
<p><strong>But I am not able to define variable in template so that I can add check :(</strong></p>
<p>Please help me on that.</p>
<p>Thanks in advance!</p>
]]></description><link>https://forum.jsreport.net/topic/1574/how-to-define-variable-in-template</link><generator>RSS for Node</generator><lastBuildDate>Sun, 12 Jul 2026 15:34:03 GMT</lastBuildDate><atom:link href="https://forum.jsreport.net/topic/1574.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 06 May 2020 13:35:20 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How to define variable in template on Invalid Date]]></title><description><![CDATA[<p>I am generating PDF and I have to add page break in PDF and I am able to do that but at last bank page is coming because i have used page break in the end of for loop</p>
<p>So, I will add page break option at the start from the second iteration of each loop, in this I will display remove my last black page</p>
<p><strong>But I am not able to define variable in template so that I can add check :(</strong></p>
<p>Please help me on that.</p>
<p>Thanks in advance!</p>
]]></description><link>https://forum.jsreport.net/post/7138</link><guid isPermaLink="true">https://forum.jsreport.net/post/7138</guid><dc:creator><![CDATA[Sher Bahadur]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[Reply to How to define variable in template on Invalid Date]]></title><description><![CDATA[<p>Hi!</p>
<p>you can define variables in the helpers section, and the helpers will have access to it, probably you can use that to set the variable with helpers and also do the check with a helper</p>
<pre><code class="language-js">// helpers
var yourCustomVariable

function helperOne () {
  // you can use your variable here
}
</code></pre>
<p>if after trying what I'm suggesting you are still having problems try to replicate your problem on the <a href="https://playground.jsreport.net/" rel="nofollow">playground</a> and share it here so we can take a look and give you a more specific solution</p>
]]></description><link>https://forum.jsreport.net/post/7139</link><guid isPermaLink="true">https://forum.jsreport.net/post/7139</guid><dc:creator><![CDATA[bjrmatos]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[Reply to How to define variable in template on Invalid Date]]></title><description><![CDATA[<p>Thanks for quick response, but i asked to define on template not in JS.</p>
<p>But anyway, I have resolved my page break issue by using <em>Handlebars</em> -&gt; created a new method and called it from HTML :)</p>
<p>Thanks again for quick response.</p>
]]></description><link>https://forum.jsreport.net/post/7140</link><guid isPermaLink="true">https://forum.jsreport.net/post/7140</guid><dc:creator><![CDATA[Sher Bahadur]]></dc:creator><pubDate>Invalid Date</pubDate></item></channel></rss>