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)
Hide single column in crosstab
Frenkys
<p>I use birt 3.7 and I am not able to hide a specific column (only one) of a crosstab. I have tried various solutions found on web but do not work (eg. CellInst.getStyle().SetDisplay("none"), setStringProperty("width", "0px"), etc.). How to hide, for example, the column with the background in yellow of the attached sample report?</p>
<div>Thanks</div>
<div> </div>
Find more posts tagged with
Comments
Clement Wong
<p>Your code (if uncommented) works for me in OS BIRT 3.7.2 when I run and view the report in the Designer (<em>Run > View Report > In Web Viewer</em>).</p>
<p> </p>
<p>cellInst.getStyle().setDisplay("none");</p>
<p> </p>
<p>How are you running your report? What format is your output?</p>
Frenkys
<blockquote class="ipsBlockquote" data-author="Clement Wong" data-cid="142992" data-time="1458758111">
<div>
<p>Your code (if uncommented) works for me in OS BIRT 3.7.2 when I run and view the report in the Designer (<em>Run > View Report > In Web Viewer</em>).</p>
<p> </p>
<p>cellInst.getStyle().setDisplay("none");</p>
<p> </p>
<p>How are you running your report? What format is your output?</p>
</div>
</blockquote>
<p> </p>
<p>I use windows birt report designer 3.7.2 and it dont work on preview and in web viewer (Run > View Report > In Web Viewer).</p>
<p>It works when i run and view as html; when I use "view as pdf" <span style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">there's a 'placeholder' (</span><span style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;"> empty space).</span></p>
<p><span style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">I would like to use </span><em>"function onPrepareCrosstab( crosstab, reportContext ) {</em></p>
<div><em>reportContext.getDesignHandle().getElementByID(ElementId#).setStringProperty("width","0px");"</em> but I don't know how to find ElementId# only of the column that I want to hide.</div>
<div>Thanks.</div>
Clement Wong
<p>Are you able to use a filter on your cross tab?</p>
<p> </p>
<p>Target: (*) Group Level <strong>ProductGroup/PRODUCTLINE</strong></p>
<p> </p>
<p>Filter Condition: <strong>data["PRODUCTLINE"] </strong> <strong>Not Equal To</strong></p>
<p><strong> "Planes"</strong></p>
<p> [x] Recalculate Totals</p>
<p> </p>
<p> </p>
<p>Attached is your example, with the filter on the cross tab.</p>
Frenkys
<blockquote class="ipsBlockquote" data-author="Clement Wong" data-cid="143005" data-time="1458800849">
<div>
<p>Are you able to use a filter on your cross tab?</p>
<p> </p>
<p>....</p>
</div>
</blockquote>
<p> </p>
<p>I would not use a filter because I use these values for total and subtotal.</p>
pricher
<p>Hi,</p>
<p> </p>
<p>You need to view your report in an external web browser (IE, Firefox, Chrome), not the internal browser. To change that setting in BIRT Designer, go to Window --> Preferences --> General --> Web Browser, then select Use external web browser and select a browser from the list (NB. If there are no browsers in the list, you can add one). Then, still in the Preferences window, go to Report Design --> Preview, and select Always use external browsers.</p>
<p> </p>
<p>Rerun your report in the Web Viewer and it will now open in the browser of your choice. The original rptdesign you sent in your post will work once you uncomment the code in the script.</p>
<p> </p>
<p>Hope this helps,</p>
<p> </p>
<p>P.</p>
Frenkys
<blockquote class="ipsBlockquote" data-author="pricher" data-cid="143016" data-time="1458839491">
<div>
<p>Hi,</p>
<p> </p>
<p>You need to view your report in an external web browser (IE, Firefox, Chrome), not the internal browser. To change that setting in BIRT Designer, go to Window --> Preferences --> General --> Web Browser, then select Use external web browser and select a browser from the list (NB. If there are no browsers in the list, you can add one). Then, still in the Preferences window, go to Report Design --> Preview, and select Always use external browsers.</p>
<p> </p>
<p>Rerun your report in the Web Viewer and it will now open in the browser of your choice. The original rptdesign you sent in your post will work once you uncomment the code in the script.</p>
<p> </p>
<p>Hope this helps,</p>
<p> </p>
<p>P.</p>
</div>
</blockquote>
<p>Tahnks,</p>
<p>the report works in the server with chrome, edge and firefox; I have problem with export in pdf: see Attached Files.</p>
pricher
<p>Hi,</p>
<p> </p>
<p>I know. I haven't found a way to delete/hide/re-size the column for PDF output.</p>
<p> </p>
<p>P.</p>