Announcement Announcement Module
No announcement yet.
questions regarding JasperReportsPdfView Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • questions regarding JasperReportsPdfView

    I'm just beginning to try and use the JasperReportsPdfView. I've searched the forum for any examples or other info regarding this and haven't found anything. So, I have a few questions about it.

    I'm trying to use a JasperReportsPdfView in a simple controller as seen below :

    public class FirstReportController implements Controller {
        public ModelAndView handleRequest(HttpServletRequest request,
    			HttpServletResponse response) throws ServletException, IOException {
        	String stringArray[] = {"oranges", "apples", "grapes"};
        	List l = Arrays.asList(stringArray);
        	HashMap model = new HashMap();
             // how do you associate a report design xml file to the view?
             // or how do you associate a report design object to the view?
        	return new ModelAndView(new JasperReportsPdfView(),"model", model);
    It's not clear to me how JasperReportsPdfView is used.

    How is the report design object (or xml file) associated with the view?
    Are there any examples of using JasperReportsPdfView?

    Again, I tried finding other forum threads but wasn't able to find the answer to my questions. Please direct me to any thread that would be helpful. I'm very new to jasper and fairly new to spring so any help is greatly appreciated.

  • #2
    The mechanism for configuring report files for the JasperReports views is covered in section 13.8 of the reference manual that comes with the 1.1.3 release.



    • #3
      Yes, thank you. That is exactly what I was looking for and enough to keep me moving along.

      From now on, I'll be sure to look in the spring-reference.pdf of the release that I'm using.