Home
Analytics
Birt and BIGINT datatypes from Apache Derby
ERadk
Hey guys! I just started a new job that has me generating reports with Birt. Fun tool, I have a problem today I couldn't find a solution to, I hope you all can help.
I am working on a Derby DB and I am attempting to make a report with Birt. In the Derby DB I have one column that is a BIGINT datatype and every record in that column is 13 digits or more (it milliseconds to use for date calculation). The data source is established without error, but when I create the data set I have my issue.
The the data set is made with a join of two tables, one of which has the BIGINT column. When I preview the results, all of my data in that column (the BIGINT) is set to 0. When I add that column to a report it is also 0, (I want to sort with this column, so this is a problem for several reasons). Birt makes the BIGINT column into a regular Integer datatype, but that can not handle a number as large as what I have stored. So the program just turns every record to zero.
I have edited the data binding for that column and changed the datatype to various other types (decimal, float, string), but I get the same results. How can I get Birt to connect to the data and leave all the BIGINT values intact? Can I manually chose or convert a specific column's datatype when I make my data connection or data set? I'm stuck here and any help or advice is greatly appreciated. Thanks!
-Eric R
Find more posts tagged with
Comments
CBR
It is already too late if you convert the datatype using the table data binding. You have to define the data type in the data set editor. To do so:
Click on tab output columns in the data set dialog. Double click the BIG INT column, change data type to decimal (this is a java big decimal and should be fine to store BIG Ints)
But from my side it looks more like your JDBC driver doesn't support BIG INTs (i always thought that BIRT would throw an exception if the datatype is not convinient). What jdbc driver jar are you using? Can you replace it with a newer or other version?
ERadk
I tried changing the data type in the output column when I created the data set, but I had the same error thrown at me. All the drivers I have used have been the ones that Birt offers by default. I am currently downloading new ones from the Apache webpage. Thanks for the reply and direction! If I find anything out I will let you know.
-Eric
ERadk
Got it this morning, thanks Cbrell! Total rookie error. I was selecting driver from the JDBC Database Connection for Query Builder. I tried every Derby drive in there, but I shadowed my new office mate today and saw that the correct Derby drivers need to be selected from the JDBC Data Source. I felt like smacking myself, oh well, that's how you learn. Thanks again!
Eric