Hi,
I have written a Jasper report using iReport and my H2 database - all works fine in iReport. I am then using the following code to try to run the report from a button in my Jabaco application :-
Dim jd As JasperDesign=JRXmlLoader.load("TypeList.jrxml")
Dim jr As JasperReport=JasperCompileManager.compileReport(jd)
Dim jp As JasperPrint=JasperFillManager.fillReport(jr,Null,con)
JasperViewer.viewReport(jp,False)
I have set up all the references as described in the post on using JasperReports with Jabaco elsewhere on this site.
The file TypeList.jrxml is in my current directory, as is the database (which has already got a connection con from my Form_Load routine. I am getting the following error from the first line of my code, which suggests that the jrxml load routine is looking for the database in the directory in which jar for the referenced class exists - which doesn't make much sense to me as I don't believe I should be trying to access the database until the fill operation, and the connection con that I have is to the database in the current ie working directory.
org.h2.jdbc.JdbcSQLException: IO Exception: "java.io.FileNotFoundException: C:\Program Files\Jaspersoft\iReport-3.7.2\ireport\modules\ext\LodgeBooks.lock.db (Access is denied)"; "C:\Program Files\Jaspersoft\iReport-3.7.2\ireport\modules\ext\LodgeBooks.lock.db" [90031-134]
I suspect that I am a victim of either my java ignorance or my jasperReports ignorance! Any suggestions to resolve this issue much appreciated.
Regards
Roger L