csplrj Posted October 5, 2008 Share Posted October 5, 2008 Software--------------JasperReport 3.1.0IReport 3.1.1MySQL 5.0 Problem--------------My SQL Query is SELECT sum(quantity*rate) as itemAmount, `item`,`color`, `fabrication`, `finishedItem`, `image`, `overheads`, `print`, `style`,customer,costId FROM (transcostsheet join mastercustomer on transcostsheet.customer_id=mastercustomer.id) left join (transcostsheetItem join transcustomeritemrate on transcostsheetItem.item_itemId=transcustomeritemrate.item_itemId)on transcostsheet.costId=transcostsheetitem.transCostSheet_costId and transcostsheet.customer_id=transcustomeritemrate.customer_id group by color,fabrication,finishedItem,image,overheads,print,style,customer,item HAVING $X{IN, costId, costIds}but it says "Unknown column$X having clause" Thanks in advanceCSJakharia Link to comment Share on other sites More sharing options...
mdahlman Posted October 6, 2008 Share Posted October 6, 2008 CSJakharia,It seems to be a bug in iReport 3.1.1. Please log this so it doesn't get forgotten. The good news is that it seems only to affect the Read Fields functionality in iReport. I get this error when I try to retrieve the fields. But then when I preview or execute the report it works fine. As a side note, you group by a set of columns then use a having clause that references a column not in this set. MySQL accepts it... but I don't think any other database will. For clarity you may want to use more standard SQL. Regards,MattJaspersoft Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now