The jasperreports came up . There was couple of jar files
missing(itext-1.1.jar and jasper-compiler-jdt-2006-01-18.jar). Included
them in framework/base/lib and built the application and it worked.

Thank you all for your help
Ravi.

On Thu, 2008-01-24 at 17:07 +0530, Ravi Subramanian wrote:
> Hi ,
> I have used JRResultSetDataSource to populate the data. I create a
> ResultSet after executing my query and I use it to poulate my
> JRDataSource. When I try to run my report i get the following error
> 
> 2008-01-24 11:24:45,165 (http-0.0.0.0-8443-Processor4)
> [StandardWrapperValve.java:253:ERROR] Servlet.service() for servlet
> ControlServlet threw exception
> java.lang.NoClassDefFoundError:
> org/eclipse/jdt/internal/compiler/ICompilerRequestor
>         at
> net.sf.jasperreports.engine.JasperCompileManager.getJavaCompiler(JasperCompileManager.java:404)
>         at
> net.sf.jasperreports.engine.JasperCompileManager.getCompiler(JasperCompileManager.java:517)
>         at
> net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:220)
>         at
> net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:206)
>         at
> org.ofbiz.webapp.view.JasperReportsPdfViewHandler.render(JasperReportsPdfViewHandler.java:86)
>         at
> org.ofbiz.webapp.control.RequestHandler.renderView(RequestHandler.java:643)
>         at
> org.ofbiz.webapp.control.RequestHandler.doRequest(RequestHandler.java:427)
>         at
> org.ofbiz.webapp.control.ControlServlet.doGet(ControlServlet.java:189)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
>         at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
>         at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
>         at
> org.ofbiz.webapp.control.ContextFilter.doFilter(ContextFilter.java:248)
>         at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
>         at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
>         at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
>         at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
>         at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
>         at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
>         at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
>         at
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:541)
>         at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
>         at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
>         at org.apache.coyote.http11.Http11BaseProtocol
> $Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
>         at
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
>         at
> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
>         at org.apache.tomcat.util.threads.ThreadPool
> $ControlRunnable.run(ThreadPool.java:684)
>         at java.lang.Thread.run(Thread.java:619)
> 
> 
> I did the steps that was given in the OPTIONAL_LIBRARIES that is needed
> to have the support of jasperreports. Do i need to do anything more as
> it says the jasper classes are not found.
> 
> Thanks,
> Ravi.
> 
> On Fri, 2008-01-18 at 05:09 -0800, Mathius Allo wrote:
> > You can either query and prepare the data in OFBiz (this is what i'm 
> > currently doing) and then pass it to JasperReport or you can pass your 
> > query parameters to JasperReport then use them to query your datasource 
> > from JasperReport. 
> > 
> > ----- Original Message ----
> > From: Ravi Subramanian <[EMAIL PROTECTED]>
> > To: [email protected]
> > Sent: Friday, January 18, 2008 6:30:36 PM
> > Subject: Re: Deploy custom jasperreports in ofbiz
> > 
> > Thanks for that information Mathius.
> > 
> > I have a query and i need to execute it to get the dataset. How can i do
> > that?
> > 
> > Thanks,
> > Ravi.
> > 
> > 
> > On Fri, 2008-01-18 at 00:20 -0800, Mathius Allo wrote:
> > > As per the documentation, you need to put a jrDataSource into the request 
> > > as an attribute. If you need to pass parameters to your report then you 
> > > would also need to put a jrParameters into the request. 
> > > 
> > > Whether you are using java or beanshell you need to put the following 
> > > into request:
> > >      request.setAttribute("jrDataSource", jrDataSource);
> > >      request.setAttribute("jrParameters", jrParameters);    
> > > 
> > > How I do it java:
> > >    ...........
> > >      // pass parameters to report
> > >      Map jrParameters = new HashMap();
> > > 
> > >      jrParameters.put("author", userLoginId);
> > > 
> > >            
> > > 
> > >      // in this case, i'm trying to pass list of projects to my jasper 
> > > report
> > >      JRDataSource jrDataSource = null;
> > > 
> > >      if(projects != null && projects.size() > 0) {            
> > >        // i'm using JRMapCollectionDataSource
> > > 
> > >        jrDataSource = new JRMapCollectionDataSource(projects);            
> > > 
> > >      }
> > >      
> > >      request.setAttribute("jrDataSource", jrDataSource);
> > > 
> > >      request.setAttribute("jrParameters", jrParameters);
> > > 
> > > You may also want to check out the following code to give you better 
> > > understanding:
> > > 1. JasperReportsPdfViewHandler.java
> > > 2. JREntityListIteratorDataSource.java
> > > 3. JRMapCollectionDataSource.java
> > > 
> > > Regards,
> > > Mathius Allo
> > > 
> > > ----- Original Message ----
> > > From: Ravi Subramanian <[EMAIL PROTECTED]>
> > > To: [email protected]
> > > Sent: Friday, January 18, 2008 1:32:56 PM
> > > Subject: Re: Deploy custom jasperreports in ofbiz
> > > 
> > > 
> > > I have not prepared the data. There is a query in the JRXML and i
> > > thought it gets executed and the data is retreived.
> > > 
> > > Now i checked on the document 
> > > 
> > > http://www.opentaps.org/docs/index.php/Using_JasperReports_with_opentaps
> > > 
> > > and it says I need to prepare the data using a beanshell script. I
> > > looked at some of the reports in the order application and i couldnt
> > > make out what the code does. Can u please help me by providing some
> > > documentation on how to populate the data using the beanshell script or
> > > with java. 
> > > 
> > > Thanks,
> > > Ravi.
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > >      
> > > ____________________________________________________________________________________
> > > Looking for last minute shopping deals?  
> > > Find them fast with Yahoo! Search.   
> > > http://tools.search.yahoo.com/newsearch/category.php?category=shopping
> > 
> > 
> >       
> > ____________________________________________________________________________________
> > Looking for last minute shopping deals?  
> > Find them fast with Yahoo! Search.  
> > http://tools.search.yahoo.com/newsearch/category.php?category=shopping
> 

Reply via email to