Home
Designing Analytics Reports
How to Add Report Parameter to Grid using Design API
Migrateduser
<p>I am trying to add to a grid the value of a report parameter using the Design API</p>
<p> </p>
<p>For images and data elements</p>
<p> </p>
<p>The pattern is</p>
<p> </p>
<p>ElementFactory factory = rDesign.getElementFactory();</p>
<p> </p>
<p>newImage = factory.newImage(imgName);<br>
newImage.setURL(imgName);<br><br>
newImage.setSource(<span style="color:#008000;font-weight:bold;">"file"</span>);</p>
<p> </p>
<p> </p>
<p>or for text it is</p>
<p> </p>
<p>ElementFactory factory = rDesign.getElementFactory();<br>
TextItemHandle newTextItem = <span style="color:#000080;font-weight:bold;">null</span>;<br>
newTextItem = factory.newTextItem(secName);<br>
newTextItem.setContentType(<span style="color:#008000;font-weight:bold;">"HTML"</span>);<br>
newTextItem.setContent(text);</p>
<p> </p>
<p> </p>
<p>then I just add this to the grid</p>
<p> </p>
<p>But I am not able to figure out how to add an existing reportParameter so it can be displayed</p>
<p>
</p>
<p> </p>
<p>When I do it using the designer I end up in my XML</p>
<p>But not sure how using the designAPI</p>
<div><data id="5794"></div>
<div> <list-property name="boundDataColumns"></div>
<div> <structure></div>
<div> <property name="name">employeeSelect</property></div>
<div> <expression name="expression" type="javascript">params["employeeSelect"]</expression></div>
<div> <property name="dataType">string</property></div>
<div> </structure></div>
<div> </list-property></div>
<div> <property name="resultSetColumn">employeeSelect</property></div>
<div> </data></div>
<div> </div>
Find more posts tagged with
Comments
There are no comments yet