Tuesday, June 21, 2005

Getting Started with iReports

  • Download ireports from ireport.sourceforge.net
  • Unzipped to c:\iReports
  • Ran ireport.bat
  • Went to Tools> Classpath> Add JAR/folder
  • Added ojdbc14.jar which for me is located in
    C:\oracle\product\10.1.0\client_2\jdbc\lib
    The correct jar file will depend on your database
  • Then I went to Data sources and added a new datasource with the following parameters:
Blockquote
Type of Connection: Database JDBC Connection
Name: ORACLE
JDBC Driver: oracle.jdbc.driver.OracleDriver
JDBC URL: jdbc:oracle:thin:@{hostname}:{PORT}:{SUID in lower case}
server address: {hostname goes here}
Database: {SUID in all caps}
username/password: {your username}/{your password}


  • I clicked the test button and a prompt came up saying the connection was successful.
  • copy tools.jar from $Oracle_Home/jdk/lib into $ireports_home/lib
  • When creating a new report, the numeric fields did not work for me-- there were errors casting from Double to String. The numbers in the db are integers (the actual type is just number). What I did was go to
  • view > report fields
  • And change all fields that were 'Double' to long, and then:
  • Double click on the text boxes that will contain the values, click the text area tab, and change the display type to one that the original type can be cast to. I changed them to long as well. Voila! works.

No comments:

Labels

Blog Archive

Contributors