Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Dynamic Header value to master page header grid
ravi11
<p>Hi,</p>
<p> </p>
<p>I am trying to get the value of a table group handle cell into the master page header grid.</p>
<p>For this I am able to set a Page variable in the table header cell and get the value and present it in the master page header grid.</p>
<p> </p>
<p>But the problem I am facing is I need to display more than one line headers in the master page.</p>
<p>So is there any way of handling this with an array? or can we store more than one value in the page varaible and display them with next lines in master page header.</p>
<p> </p>
<p>Thanks,</p>
<p>Ravi</p>
Find more posts tagged with
Comments
Matthew L.
<p><span style="font-size:14px;">Ravi,</span></p>
<p> </p>
<p> </p>
<p><span style="font-size:14px;">Depending on how you are wanting to accomplish this you could set an array, push values to it, convert it back to a string, and assign it to the Report/Page Variable.</span></p>
<p> </p>
<p> </p>
<p><span style="font-size:14px;">Example:</span></p>
<p><span style="font-size:12px;"><span style="color:#800080;">var</span> tmp = vars[<span style="color:#0000ff;">"NewVariableElement"</span>] ? vars[<span style="color:#0000ff;">"NewVariableElement"</span>].split(<span style="color:#0000ff;">","</span>) : []; <span style="color:#008000;">//Set tmp to reportvariable if contains value, else start new array.</span><br><span style="color:#800080;">if</span> (tmp.indexOf(row[<span style="color:#0000ff;">"COUNTRY"</span>]) < 0) { <span style="color:#008000;">//If row["country"] doesn't already exist in array.</span><br>
tmp.push(row[<span style="color:#0000ff;">"COUNTRY"</span>]); <span style="color:#008000;">//Add row data to array.</span><br>
vars[<span style="color:#0000ff;">"NewVariableElement"</span>] = (tmp.sort()).toString(); <span style="color:#008000;">//Sort array, convert to string, and set reportvariable to new value.</span><br>
}</span></p>
<p> </p>
<p><span style="font-size:14px;">Then on the Master Page, you could split the Report/Page Variable with new line breaks.</span></p>
<p> </p>
<p><span style="font-size:14px;">Example:</span></p>
<p><span style="font-size:14px;"><span style="font-size:12px;">vars[<span style="color:#0000ff;">"NewVariableElement"</span>].split(<span style="color:#0000ff;">','</span>).join(<span style="color:#0000ff;">'\n'</span>);</span></span></p>
<p> </p>
<p>Another method could be to append values to the <span style="font-size:14px;">Report/Page Variable with line breaks included "\n"</span></p>
<p> </p>
<p><span style="font-size:14px;">Example:</span></p>
<p><span style="font-size:12px;">vars[<span style="color:#0000ff;">"NewVariableElement1"</span>] += <span style="color:#0000ff;">"\n"</span> + row[<span style="color:#0000ff;">"COUNTRY"</span>];</span></p>
ravi11
<p>Hi Matthew,</p>
<p> </p>
<p>Thanks a lot it worked for me.</p>
<p> </p>
<p>Ravi</p>