Jump to content
We've recently updated our Privacy Statement, available here ×

Collection paramater for IN not working


csplrj

Recommended Posts

Software

--------------

JasperReport 3.1.0

IReport 3.1.1

MySQL 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 advance

CSJakharia

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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,
Matt
Jaspersoft

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...