BIRT Exchange Forum: Parameters without quotes - BIRT Exchange Forum

Jump to content


 

No Latest Open Poll.

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Parameters without quotes Rate Topic: -----

#1 User is offline   the.root Icon

  • Member
  • PipPip
  • Group: Members
  • Posts: 17
  • Joined: 13-October 11


Posted 27 February 2012 - 12:04 PM

Hello,

I'm trying to pass an alias.column_name off through a view-time parameter used in my query, however whenever I do I get empty results. I imagine this is because the Birt Spreadsheet Designer is encapsulating my parameters with single or double quotes and since i'm referring direcetly to a column name and not a value mysql isn't returning anything.. I had the same problem with birt/eclipse but I got around it by just creating a javascript before the dataset was queried and replaced the values in the query w/out quotes.

EX:

RP_property ,is my parameter.

SELECT *
FROM property_info AS pi
WHERE pi.propertyid = :RP_property

....
Now if I set RP_property to a valid entry say 001 it works no problem; but if I set it to pi.propertyid ,it returns nothing. It should return the entire table. I don't know if there's a way to show the generated query somehow after all parameters and what not get filled in at run time, so i'm just guessing it's because of some quotes being added.

I'm sure there's an easy work around with the spreadsheet designer/java api i don't know about yet. I'm still rather new in the realm.

Please let me know if you have any suggestions or thoughts!
0

#2 User is offline   the.root Icon

  • Member
  • PipPip
  • Group: Members
  • Posts: 17
  • Joined: 13-October 11


Posted 29 February 2012 - 07:29 AM

FYI, I ended up just making a sproc and built a dynamic sql statement based on the parameters, rather then just try to pass off column names as variables. It worked for me, although I'd still be curious if there's a way to do this in spreadsheet designer.
0

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users