Home
Designing Analytics Reports
DEAPI -How to move table from a grid to the body
Migrateduser
<p>I have a need to output a report to CSV.</p>
<p> </p>
<p>For this emitter I need the table to be at the top level not embedded in a Grid.</p>
<p> </p>
<p>So I tried the following</p>
<p> </p>
<p>ReportDesignHandle rDesign = getDesignFile(request,response,designFileTmp.getAbsolutePath());</p>
<p> </p>
<p>// Get the Object I want to move</p>
<p>TableHandle table1 = (TableHandle)rDesign.findElement(<span style="color:#008000;font-weight:bold;">"Table_1"</span>);</p>
<p> </p>
<p> </p>
<p>// Get the grid the table is currently in</p>
<p>DesignElementHandle baseGrid = rDesign.findElement(<span style="color:#008000;font-weight:bold;">"BaseGrid"</span>);</p>
<p> </p>
<p>// Drop the existing Grid and table</p>
<p>baseGrid.dropAndClear();</p>
<p> </p>
<p>// Add the table to the body</p>
<p>rDesign.getBody().add( newTable );</p>
<p> </p>
<p>
</p>
<p> </p>
<p>But when I try to open this I get a Corrupted file.</p>
<p>So I am missing something.</p>
<p> </p>
<p> </p>
<p> </p>
Find more posts tagged with
Comments
There are no comments yet