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)
Dropping empty columns in a table
Ramprasad
<p>Hi All,</p>
<p> </p>
<p>How to drop empty columns in table.</p>
<p>I am attaching a file. Where <strong>Drug Week_1</strong> and <strong>Drug Week_2 </strong>cells are empty for this page only. Other pages may have value for these two columns. I just want to drop these columns for this particular page.</p>
<p> </p>
<p>We have to implement this by using birt engine api. Giving an example using java class helps us a lot. If not possible Please give an example with .rptdesign.</p>
<p> </p>
<p> </p>
<p>Thanks,</p>
<p>Ramprasad.</p>
<p> </p>
Find more posts tagged with
Comments
GLO_FR
<p>Why don't you use the visibility functionality ?</p>
<p>You can hide dynamicaly a column depending on what ever you want.</p>
<p> </p>
<p>Check this example.</p>
Ramprasad
<p>Hi GLO_FR,</p>
<p> </p>
<p>Thanks for your quick response.</p>
<p>In the example 'PRODUCTLINE' column is dropped in every page.</p>
<p> </p>
<p>I have attached a file.</p>
<p>I have grouped data based on 'PRODUCTLINE'. Now we have 6 groups.</p>
<p>Our requirement is if 'PRODUCTLINE' value is 'Planes', the PRODUCTLINE column should drop in that page only(Second Page only), not in other pages.</p>
<p> </p>
<p> </p>
<p>Thanks,</p>
<p>Ramprasad.</p>
GLO_FR
<p>Hi,</p>
<p> </p>
<p>ohhh, my fault.</p>
<p> </p>
<p>I don't think it is possible (or easy to do), because the table is define for all the pages and not for each page.</p>
<p>Also, the header is created BEFORE the group, that mean that you can't say <strong>if myValue == 'Planes { hideMycolumn = true} </strong>because the header is already created when BIRT is doing the test</p>
<p> </p>
<p>But, you can easily hide a column dynamically on the detail row depending on the group value.</p>
<p> </p>
<p>here is another example with another approach.</p>
<p> </p>
<p>For the second table (page 7 to 12), the trick is to place the header inside the group.</p>
<p>So I can manage it easily</p>
Ramprasad
<p>Hi GLO_FR,</p>
<p> </p>
<p>Excellent thinking......</p>
<p>This works for two columns comfortably.</p>
<p>But in my requirement there can be any no of Intervals like <strong>interval_1, interval_2, interval_5, interval_9, </strong>etc.....</p>
<p>These intervals are dynamic columns(Simply transpose columns). I will give an example</p>
<p> </p>
<p><strong>This is input</strong> :</p>
<p>Student Subject Marks </p>
<p>===========================</p>
<p><strong>Group1</strong></p>
<p>S1 Subjects1 10</p>
<p>S1 Subjects2 20</p>
<p>S1 </p>
<p>S1 Subjects4 40</p>
<p>S1 Subjects5 50</p>
<p> </p>
<p>S2 Subjects1 10</p>
<p>S2 Subjects2 20</p>
<p>S2 </p>
<p>S2 Subjects4 40</p>
<p>S2 Subjects5 50</p>
<p> </p>
<p><strong>Group2</strong></p>
<p>S1 Subjects1 10</p>
<p>S1 Subjects2 20</p>
<p>S1 Subjects3 30</p>
<p>S1 Subjects4 40</p>
<p>S1 Subjects5 50</p>
<p>S1 Subjects6 60</p>
<p> </p>
<p>S2 Subjects1 10</p>
<p>S2 Subjects2 20</p>
<p>S2 Subjects3 30</p>
<p>S2 Subjects4 40</p>
<p>S2 Subjects5 50</p>
<p>S2 Subjects6 60</p>
<p> </p>
<p><strong>Output should be like this</strong></p>
<p><strong>Page1</strong></p>
<p>Student Marks1 Marks2 Marks3 Marks4 Marks5 Marks6</p>
<p>============================================================</p>
<p>S1 10 20 40 50</p>
<p>S2 10 20 40 50</p>
<p> </p>
<p><strong>Page2</strong></p>
<p>Student Marks1 Marks2 Marks3 Marks4 Marks5 Marks6</p>
<p>============================================================</p>
<p>S1 10 20 30 40 50 60</p>
<p>S2 10 20 30 40 50 60</p>
<p> </p>
<p>Here any number of 'subject marks' are there. We cant predict no of 'subject marks'. I am able to do all these things. In this example <strong>Marks3</strong> has no values in <strong>Page1</strong> but where as in <strong>Page2</strong> there are values. Our requirement is to drop <strong>Marks3 </strong>and<strong> Marks6</strong> in <strong>Page1</strong> only not in <strong>Page2.</strong></p>
<p> </p>
<p>Please help us to fix this issue.</p>
<p> </p>
<p> </p>
<p>Thanks,</p>
<p>Ramprasad.</p>
GLO_FR
<p>If you don't know how many subjects you will have, create a crosstab inside a table.</p>
<p> </p>
<p>Make a simple table with a group on the group number, and inside create a crosstab with subject in column and student in row.</p>
<p>The mark value will be the result</p>