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)
Sorting a Table with no rows results in error
xenotel
<p>I am using a report that uses a Joint Data set and one of the joined tables I have an Order By defining the sorted column. When I Preview Results from the original data set, the order is correct but when I Preview Results of the Joint Data Set, the results are in DB order meaning that are coming out in the order stored in the DB. This was a curious problem, so to get around it I placed a SORT order on the report table itself that worked fine except if the query resulted in zero rows returned. So rather than getting a nicely formatted empty report, I get an exception on the screen that I assumed is caused because the arrays are not defined due to no data being returned. This can happen based on the users selection criteria. </p><p> </p><p>SO question is - how can I get the Joint Data Set to respect the Order By I used on one of the joined tables or get the SORT on the report table to work?</p><p> </p><p>I used BIRT Designer Version 3.7.2v20120213 BUild 3.7.2.v20120214-1408 to create the reports in Eclipse Indigo.</p><p> </p><p>Any hints of bugs or things to consider would be appreciated.</p>
Find more posts tagged with
Comments
kclark
<p>Instead of using the joined dataset UI you could try joining them in your query and doing your group by from there. It would look something like this</p><pre class="_prettyXprint">select CLASSICMODELS.CUSTOMERS.CUSTOMERNUMBER, CLASSICMODELS.CUSTOMERS.CUSTOMERNAME, CLASSICMODELS.PAYMENTS.PAYMENTDATEfrom customersinner join paymentsON CLASSICMODELS.CUSTOMERS.CUSTOMERNUMBER = CLASSICMODELS.PAYMENTS.CUSTOMERNUMBERorder by paymentdate ASC</pre>