Results 1 to 3 of 3

Thread: html jasperreports by email problem.

  1. #1
    Join Date
    Aug 2004
    Location
    Brussels, Belgium
    Posts
    9

    Default html jasperreports by email problem.

    Hello,

    I need to send (by email) a report (in html) generated by JasperReports.

    JasperReports generates an xxx.html file with references to an xxx.html_files/px file.

    I use MimeMessageHelper.setText(xxx.html)

    Now my questions are:

    1. How do I include/embed the xxx/px data in the email as well? I looked at MimeMessageHelper.addInline(cid, ...) but the references in xxx.html to a xxx/px are not done with cid:.
    2.Is there a way to avoid the generation of these files xxx.html and xxx.html_files/px and directly send the generated report by email? With ModelAndView?

    I looked at the various docs but didn't find anything for me .

    Any help welcome,

    Thanks in advance,

    Yves.

  2. #2
    Join Date
    Aug 2004
    Location
    Southampton, UK
    Posts
    826

    Default

    Yves,

    There is no direct support in Spring for generating HTML reports for e-mail transmission. You really have two options when generating the mails: embed images or not.

    If you choose not to, you can have your HTML include absolute paths (starting with http://) to the images so they can still be rendered.

    If you do embed them, you need to parse the HTML after it is generated and transform the image URLs into cid: URLs. This can be done quite simply with a regular expression.

    Rob
    Rob Harrop
    Lead Engineer, dm Server
    SpringSource
    http://www.springsource.com

    Co-Author - Pro Spring

  3. #3
    Join Date
    Aug 2004
    Location
    Brussels, Belgium
    Posts
    9

    Default

    Thanks Rob,

    Now it works (I parsed the HTML and transformed the image URLs into cid: URLs).

    Yves.

Similar Threads

  1. Replies: 1
    Last Post: Jul 5th, 2005, 03:48 AM
  2. pagination and continuation problem in SWF
    By yfmoan in forum Web Flow
    Replies: 6
    Last Post: Jun 29th, 2005, 03:42 AM
  3. Replies: 1
    Last Post: Mar 17th, 2005, 12:05 AM
  4. Replies: 0
    Last Post: Feb 16th, 2005, 01:45 PM
  5. Lazy Load Problem when Doing UnitTest
    By yoshi in forum Data
    Replies: 7
    Last Post: Sep 29th, 2004, 10:00 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •