want to use ireport with sqlite or java derby
I am developing an application using Java with MySQL for a custom开发者_StackOverflow中文版er. I don't want the customer to install MySQL on his PC, so I moved to java Derby DB. Unfortunately, I couldn't find in the ireport wizard a connection for Derby or SQLite; is there a solution for that?
First download sqlitejdbc.jar
You have to go in iReport Tools - > Options - > Classpath then click add jar and add downloaded sqlitejdbc.jar file.
Now to connect to database. First select Jdbc connection. Still after that you didn't see sqlite driver in JDBC driver combobox. So wirte in that " org.sqlite.JDBC" and in JDBC url type " jdbc:sqlite:sqlite file location" For example "jdbc:sqlite:E:\Workplace\Db_test\project2.sqlite".
then click test if you given any password then type password else leave it blank.:)
If you want to make a connection to a database in iReport that isn't there by default you need to add the jar to the iReport classpath. In the past I have just added the jar with the driver to the lib folder in iReport and restarted iReport.
精彩评论