Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

...

Source Code with documentation available at http://code.google.com/p/google-summer-of-code-2009-dspace/downloads/listImage Removed

  • The above reports are yet to be tested on non-windows environment but should work well if the following changes are made to the Java source file.
  • Change the windows path to suit your unix based environment in the following statements in Java source file.
    • jR = JasperCompileManager.compileReport("F:/GSOC2009DSpaceReport/CollectionTitles.jrxml");
    • JasperExportManager.exportReportToPdfFile(jP,"F:/GSOC2009DSpaceReport/CollectionTitles.pdf");
  • Remove the following statement from the Java source file.
    • Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler "+ "F:/GSOC2009DSpaceReport/CollectionTitles.pdf");

...

  1. Create a folder called "GSOC2009DSpaceReport". Here we have the path of this folder as F:/ GSOC2009DSpaceReport. You may choose any folder of your choice, but make sure that you have made appropriate modifications in the Java source code as explained in the Notes section.
  2. Download JasperReports 3.5.0 (i.e.jasperreports-3.5.0-project.zip) at http://jasperforge.org/projects/jasperreportsImage Removed into the folder "GSOC2009DSpaceReport". Extract the ZIP file into the same directory and this creates a folder named "jasperreports-3.5.0" automatically in the "GSOC2009DSpaceReport" folder.
  3. Download jasperreports-3.5.0.jar file available at http://sourceforge.net/project/showfiles.php?group_id=36382&package_id=28579Image Removed into F:\GSOC2009DSpaceReport\jasperreports-3.5.0\lib. If this jar file is not used there would be a build error while compiling the project indicating that JasperReports engine is not available.
  4. Copy the postgresql-8.1-408.jdbc3 jar file from dspace-1.5.2-release\dspace\target\dspace-1.5.2-build.dir\lib into F:\GSOC2009DSpaceReport\jasperreports-3.5.0\lib
  5. Install Java SE 6 for Windows if your machine doesn't have one installed.http://java.sun.com/javase/downloads/index.jspImage Removed
  6. Install the Java IDE, JCreator LE v4.50 for Windows http://www.jcreator.com/download.htmImage Removed
  7. Open the JCreator IDE
  8. Select "File" - "New Project" and select "Basic Java Application". Click the "Next" button
  9. In the project wizard give Name (i.e. project name) as DSpaceReport
  10. Click "Finish' on the Project Wizard interface. This creates the "DSpaceReport" project.
  11. On the JCreator IDE - Menu bar, Click "Project" - "Project Settings" and select "Required Libraries" tab.
  12. Click the "New" tab and give Name as "DSpaceReportLibrary"
  13. Click the "Add" button and select the "Add Archive" button. Browse to F:\GSOC2009DSpaceReport\jasperreports-3.5.0\lib. Using the CTRL + A computer keyboard combination select all jar files there and select "Open".
  14. Click on the "OK" button.
  15. Check the "DSpaceReportLibrary" and click "OK".
  16. Download the given TitleAuthorReport.jrxml file into the folder "GSOC2009DSpaceReport".
  17. Download the java file DSpaceReport.java into the folder "GSOC2009DSpaceReport". Open this downloaded java file and copy its java source code into the DSpaceReport.java file created using the JCreator IDE after completely clearing the default java code available in that file.
  18. Download the given file Functions.sql into the folder "GSOC2009DSpaceReport".
  19. Start PostgeSQL 8.2 and select "pgAdmin".
  20. Connect to PostgreSQL using the "postgres" user account and password.
  21. Select the DSpace database. Click on the SQL icon (Blue in color) and select "File" - "Open". Browse to the folder GSOC2009DSpaceReport and select the file "Functions.sql". Click Open.
  22. Click on the "Execute Query" button to execute the functions. Exit the PostgreSQL interface using "File" - "Exit".
  23. Build the java file using "Build" - "Build File".
  24. Run the file using "Run" - "Run File".
  25. The Report is generated and displayed in PDF file format.

...

References: