EJB programming & troubleshooting: How can I generate reports and send them by email through J2EE

  1. Hi,
     I need to generate a report something similar to Oracle developer 2000 reports. I need to send this report by email if the user wishes. How can I implement in J2EE.
    Has any one got any clue. Please.
  2. You can use JavaMail to send email in J2EE.

  3. The key issue here is how to output the query result to a formatted file on the server, and then use JavaMail to send it as an attachment. EJB's cannot do file I/O, so you have to use servlets/JSPs, but formatting is very tricky, if not impossible. I have to give the edge to ASP/COM over JSP/EJB for this kind of work. Crystal Reports automation server is SO easy to use from ASP and it puts out great looking reports as Word docsformat. Using CDO to send an exported copy via email is also a breeze ...
  4. I have an interesting situation that meshes with your comments pretty well. I am about to rewite an existing application that consists of legacy PowerBuilder code in a COM component on the middle tier, and the user interface is a mixture of ASP and XML. ALL the business logic is in the COM component.

    Requirements (in order of priority):
    1) Provide a rich reporting and charting/graphing front-end.
    2) Get the business logic out of the single apartment threaded COM component.
    3) Build an open and scalable solution.

    I have been strongly leaning toward J2EE for reqs 2 and 3. From what I'm hearing you say, though, from the perspective of #2, I need to not be too hasty to abandon ASP... Right!?!?!
  5. I feel Microsoft and Java will coexist in a long time to come. In the current and previous projects I am working and worked on, when it comes to fulfilling users' reporting requirements, Microsoft based technologies are chosen over Java-based solutions. I don't doubt J2EE is superior with respect to transaction processing and messaging related work, but you have to give the edge to Windows for data formatting/reporting. The limited Java based reporting solution I have been hearing about includes FormulaOne from TideStone.
  6. We can help. Check out http://www.dynalivery.com