Jump to content
We've recently updated our Privacy Statement, available here ×

eugene s

Members
  • Posts

    3
  • Joined

  • Last visited

eugene s's Achievements

Newbie

Newbie (1/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Conversation Starter Rare

Recent Badges

0

Reputation

  1. Hello. I am using jasperreports library to generate reports. I am trying to change classpath at runtime to be able to update fonts and scriptlets files. When I need to add new files to classpath I create new ClassLoader and pass new files as URL[] to it's contructor. After that I set the classloader to current thread. The library generates documents properly with new fonts and scriptlets. But when I want to remove old version of the files (after generation is complete) I can't do it because of java.io.IOExceprtion: Cannot delete. Looks like the files are still used by some part of Jasperreports library. Here is the code which I use to create class loader with new files: ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader();try { contextClassLoader.close();} catch (Throwable throwable) { throwable.printStackTrace();}ClassLoader classLoader = new URLClassLoader(filesForClasspath.toArray(new URL[filesForClasspath.size()]));Thread.currentThread().setContextClassLoader(classLoader); [/code] What do I do wrong? How classpath update should be done properly to be able to remove files that I don't need anymore?
  2. honeybakliwal, could you please give an example? I'm not sure I understand what is a direct connection with csv. Thanks
  3. Hello! I want to create a service that produces pdf from csv files. The service must have a csv and template as input and pdf as output. To do that I wanted to use Jasper Server REST API. I decided to try it manually for the beginning and was quite disappointed that there was no ability to use csv as datasource. The only workaround was found here: http://community.jaspersoft.com/questions/802580/how-create-excel-data-source-jasperreports-servers`. But creation report this way looks like a mess. Changing extension of the source csv file to xml, creation additional data provider with hardcoded link to the source file and editing template to set hardcoded link to the data provider. All of this doesn't look like proper way to generate a report from csv. Does anybody know some easier way? Maybe commercial version of the server has some useful features? The best solution I'd like to have is passing a bundle of csv source file and appropriate template to the server through REST API and get generated pdf. Is there something like this? Thanks
×
×
  • Create New...