Home
Analytics
BIRT : Sort a Table based on multiple columns
megschiru
<p>Hi All,</p><p>I'm using Eclipse Birt 3.7.2</p><p>I have generated a BIRT report using a JAVA POJO data source. I want to sort the rows based on the sum of 2 columns(Integer) And then display the top 10 rows.</p><p>In the Sorting Tab, I've used for the expression: row["column1"]+row["column2"] and in the Filters Tab, I've put the expression row["column1"]+row["column2"], Operator as Top n and Value1 as 10</p><p>But the resulting 10 rows are not sorted. </p><p>Or</p><p>Can we do this using javascript.</p><p>Please Help...</p><p>Thanks...</p>
Find more posts tagged with
Comments
micajblock
<p>Is the report grouped by anything?</p>
megschiru
<blockquote class="ipsBlockquote" data-author="mblock" data-cid="128512" data-time="1402490591"><div><p>Is the report grouped by anything?</p></div></blockquote><p>No.</p>
micajblock
<p>can you provide some sample data?</p>
micajblock
<p>try to create a new binding with the expression [color=rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;]row["column1"]+row["column2"] and sort on the new binding.[/color]</p>
megschiru
<p>I have to sort these rows based on the sum of Transmit and Receive columns</p><p> </p><div><div><div><strong>Interface Transmit Receive </strong></div></div></div><div><div><div>iface1352 31 64</div></div></div><div><div><div>iface936 33 55</div></div></div><div><div><div>iface416 44 54</div></div></div><div><div><div>iface1976 9 49</div></div></div><div><div><div>iface832 38 48</div></div></div><div><div>iface208 49 46</div></div><div><div><div>iface1664 45 46</div></div></div><div><div><div>iface624 28 36</div></div></div><div><div><div>iface312 48 35</div></div></div><div><div><div>iface1560 49 30</div></div></div>
megschiru
<p>Yes. It is Working Now.</p><p>I've created a new binding with the expression [color=rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;]row["transport"]+row["receive"] [/color]and sorted based on the binding.</p><p>Thanks mblock.</p>