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

pablodr

Members
  • Posts

    2
  • Joined

  • Last visited

pablodr'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. Well, I had the same problem yesterday, and my solution was the next: I put the next code into my java reporter: String reportsDirPath =getServlet().getServletContext().getRealPath("/")+"path_to_my_report_folder" ; File reportsDir = new File(reportsDirPath); if (!reportsDir.exists()) { try { throw new FileNotFoundException(String.valueOf(reportsDir)); } catch (FileNotFoundException e) { e.printStackTrace(); mapping.findForward("/InternalError.do"); } } HashMap<String,Object> hm = new HashMap<String,Object>(); hm.put(JRParameter.REPORT_FILE_RESOLVER, new SimpleFileResolver(reportsDir)); Width this code I pass the path to my report template (the images are in the same directory) and then, when I compile the template, the location is correct. Then into jasperreport template, I only needs put the next to locate an image <image> <reportElement x="45" y="52" width="55" height="36"/> <imageExpression class="java.lang.String"><![CDATA["usc.jpeg"]]></imageExpression> </image>
  2. Helo, first, excuse my English isn't very good. I'm trying tell my problem. I've a jasperreport template with a several text fields, well, the last text field is very big and it saves a lot of lines, and the text has "justified" text alingment. When this field needs expand to the next page, broke the last line in the original page and not justify it (the line is alingned to the left leaving blank spaces in the rest of the line), and then continues into the next page with the rest of the text. Thank you.
×
×
  • Create New...