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)
Insert new element on run time in a specific place in the report
ShlomiW
<p>Hi all,</p><p> </p><p>I'm trying to figure out how to place an element that I create dynamically (using the API) between 2 grids that are already placed in the report.</p><p> </p><p>I have added an example, there you can see that in the report design I have 2 grids (one with a pie chart and the bookmark "chart1" and the other with a bar chart and the bookmark "chart2").</p><p>Also I have a script in the "initialize" section of the report that creates a text element by using the API.</p><p> </p><p>When I run my report I get the following display</p><p>Grid1 (with bookmark "chart1")</p><p>Grid2 (with bookmark "chart2")</p><p>New test element</p><p> </p><p>I would like to change it so the order will be:</p><p>Grid1 (with bookmark "chart1")</p><p>New test element</p><p>Grid2 (with bookmark "chart2")</p><p> </p><p>Hope that I made it clear and that you will be able to help my</p><p>Have a great day</p><p>Shlomi</p>
Find more posts tagged with
Comments
kclark
<p>If your charts are already in the report and your adding a label it might be easier to just place the label between the two charts and then drop it in the initialize() of your report depending on some input. If you want to add the label using the API's the easiest way might be to add the two charts to one large grid and have there be a cell between the two of them.and then you could add the label using something like</p><pre class="_prettyXprint">CellHandle cell = (CellHandle) row.getCells( ).get( 1 );cell.getContent( ).add(grid);</pre>
ShlomiW
<p>There isn't a way that I can call/find the first grid (with [color=rgb(0,0,0);font-family:helvetica, arial, sans-serif;]bookmark "chart1") and then do an action like [/color]<span style="font-size:14px;">append (in jQuery) in order to add my new element below it?</span></p><p> </p><p>Also can you please make my an example report that does what you suggested so I will have a working example?</p><p> </p><p>Thank's a lot</p><p>Shlomi</p>