Jasper Reports Plugin (classic SQL type) need to query UUID

Questions and answers on developing, deploying and using plugins and JavaBeans

Jasper Reports Plugin (classic SQL type) need to query UUID

Postby cakins » Sat Sep 27, 2014 7:47 pm

I need to be able to query match against a UUID column in a classic SQL type jasper report. So instead of passing a foundset I am going the classic SQL route. I have been able to construct datasets inside the jasper reports for all types of lookups except against the most important one. Our primary keys are UUIDs. If I pass the relevant UUIDs as parameters and make them java strings I get a cast error. If I pass the UUIDs as parameters and make them type com.servoy.j2db.util.UUID then I get Parameter type not supported in query : topic_id class com.servoy.j2db.util.UUID . I also tried doing a cast of the field inside the SQL query and the plugin engine didnt like that either. There should be a way to use the classic SQL (not foundset) method inside jasper reports and query on UUID columns. I really need a way to do this as foundsets arent going to cut what we need to do. Any suggestions?
cakins
 
Posts: 3
Joined: Tue Mar 25, 2014 11:20 pm

Re: Jasper Reports Plugin (classic SQL type) need to query U

Postby ptalbot » Sun Sep 28, 2014 3:44 am

Pass the UUID as String using yourUUIDValue.toString()
Patrick Talbot
Freelance - Open Source - Servoy Valued Professional
https://www.servoyforge.net
Velocity rules! If you don't use it, you don't know what you're missing!
User avatar
ptalbot
 
Posts: 1654
Joined: Wed Mar 11, 2009 5:13 am
Location: Montreal, QC

Re: Jasper Reports Plugin (classic SQL type) need to query U

Postby cakins » Fri Oct 03, 2014 11:13 pm

The error in UUID comparision is happening in the jasper reports plugin. Passing the UUID to the report as a string doesnt help and as far as I know there is no UUID type support in jasper reports. So basically I am passing a string version of the UUID to the report but when it does its query against a column in the table that is of type UUID the jasper plug in throws the SQL comparison error. Any other suggestions?
cakins
 
Posts: 3
Joined: Tue Mar 25, 2014 11:20 pm


Return to Plugins and Beans

Who is online

Users browsing this forum: No registered users and 9 guests