<p>All,</p>
<p> </p>
<p>Using BIRT Runtime Engine 4.3 and attempting to implement column sorting like in <a data-ipb='nomediaparse' href='
http://www.ibm.com/developerworks/data/library/techarticle/dm-0708tomlyn/'>this example</a> (Option #1). This is working well for simple reports that are based off of one data set. </p>
<p> </p>
<p>The problem I'm facing is on reports with tables binding to joint data sets. The other aspect is that we're calling some functions in the query and creating column aliases. Specifically, the issue I'm having is that the column name I'm passing over the hyperlink is not having an impact on the sort direction of my column. </p>
<p> </p>
<p>So given a table that is bound to a joint data set, trying to pass something with the hyperlink like <span style="color:rgb(0,0,0);font-family:'Andale Mono', 'Lucida Console', Monaco, Liberation, fixed, monospace;font-size:14px;font-style:normal;font-weight:normal;text-align:left;background-color:rgb(255,255,255);">'targetURL + "VIEWSCHEMA.MY_TABLE.MY_COL";' </span>throws the following exception:</p>
<pre class="_prettyXprint">
org.eclipse.birt.report.data.oda.jdbc.JDBCException: SQL statement does not return a ResultSet object.
SQL error #1:Column "schema.table.column" is invalid in the ORDER BY clause because it is not contained in either an aggregate function or the GROUP BY clause.
;
java.sql.SQLException: Column "schema.table.column" is invalid in the ORDER BY clause because it is not contained in either an aggregate function or the GROUP BY clause.
at org.eclipse.birt.report.engine.executor.ExtendedGenerateExecutor.execute(ExtendedGenerateExecutor.java:70)
</pre>
<p>If I alter the above to be like <span style="color:rgb(0,0,0);font-family:'Andale Mono', 'Lucida Console', Monaco, Liberation, fixed, monospace;font-size:14px;font-style:normal;font-weight:normal;text-align:left;background-color:rgb(255,255,255);">'targetURL + "MY_COL";' </span>there's no exception but the report is only reloaded with no sorting. I've tried "MY_COL" as both the original column name and the alias name to no avail.</p>
<p> </p>
<p> </p>
<p>What is the appropriate value that I should enter to achieve sorting in joint data sets?</p>
<p> </p>
<p>Thanks!</p>