Deploy custom jasperreports in ofbiz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Deploy custom jasperreports in ofbiz

Ravi Subramanian
Hi,

I am trying to deploy a custom report in ofbiz application.

I have created a JRXML report template using iReport and in the
controller.xml i have added the following handler

    <handler name="jasperreportspdf" type="view"
class="org.ofbiz.webapp.view.JasperReportsPdfViewHandler"/>

The request-uri definition for the report in controller.xml is

<request-map uri="AccountsReport.pdf">
        <security https="true" auth="true"/>
        <response name="success" type="view" value="AccountsReport"/>
</request-map>

The corresponding view-map is

 <view-map name="AccountsReport" type="jasperreportspdf"
page="/reports/repository/Accounts.jrxml" content-type="application/pdf"
encoding="none"/>

When i access the url i am getting the template of the report but no
rows are returned. But for the corresponding query in the database a
result set containing some rows is being returned. The accessing of the
data is not taking place.

Someone assist me with this please.

Thanks,
Ravi Subramanian.

Reply | Threaded
Open this post in threaded view
|

Re: Deploy custom jasperreports in ofbiz

David E Jones

How are you doing data querying/preparation for this report? I didn't  
see that in what you wrote up...

-David


On Jan 17, 2008, at 5:18 AM, Ravi Subramanian wrote:

> Hi,
>
> I am trying to deploy a custom report in ofbiz application.
>
> I have created a JRXML report template using iReport and in the
> controller.xml i have added the following handler
>
>    <handler name="jasperreportspdf" type="view"
> class="org.ofbiz.webapp.view.JasperReportsPdfViewHandler"/>
>
> The request-uri definition for the report in controller.xml is
>
> <request-map uri="AccountsReport.pdf">
>        <security https="true" auth="true"/>
>        <response name="success" type="view" value="AccountsReport"/>
> </request-map>
>
> The corresponding view-map is
>
> <view-map name="AccountsReport" type="jasperreportspdf"
> page="/reports/repository/Accounts.jrxml" content-type="application/
> pdf"
> encoding="none"/>
>
> When i access the url i am getting the template of the report but no
> rows are returned. But for the corresponding query in the database a
> result set containing some rows is being returned. The accessing of  
> the
> data is not taking place.
>
> Someone assist me with this please.
>
> Thanks,
> Ravi Subramanian.
>

Reply | Threaded
Open this post in threaded view
|

Re: Deploy custom jasperreports in ofbiz

Mathius Allo
In reply to this post by Ravi Subramanian
Hi Ravi,

We are currently using Jasper Report in our project successfully. Although I am not able to an image on the report (looks like jasper report is unable to find the image what it tries to generate the pdf).

How do you pass data to your report? In my case, I use java to prepare the data to be passed to the report.

Regards,
Mathius
----- Original Message ----
From: David E Jones <[hidden email]>
To: [hidden email]
Sent: Thursday, January 17, 2008 11:39:07 PM
Subject: Re: Deploy custom jasperreports in ofbiz


How are you doing data querying/preparation for this report? I didn't  
see that in what you wrote up...

-David


On Jan 17, 2008, at 5:18 AM, Ravi Subramanian wrote:

> Hi,
>
> I am trying to deploy a custom report in ofbiz application.
>
> I have created a JRXML report template using iReport and in the
> controller.xml i have added the following handler
>
>    <handler name="jasperreportspdf" type="view"
> class="org.ofbiz.webapp.view.JasperReportsPdfViewHandler"/>
>
> The request-uri definition for the report in controller.xml is
>
> <request-map uri="AccountsReport.pdf">
>        <security https="true" auth="true"/>
>        <response name="success" type="view" value="AccountsReport"/>
> </request-map>
>
> The corresponding view-map is
>
> <view-map name="AccountsReport" type="jasperreportspdf"
> page="/reports/repository/Accounts.jrxml" content-type="application/
> pdf"
> encoding="none"/>
>
> When i access the url i am getting the template of the report but no
> rows are returned. But for the corresponding query in the database a
> result set containing some rows is being returned. The accessing of  
> the
> data is not taking place.
>
> Someone assist me with this please.
>
> Thanks,
> Ravi Subramanian.
>


      ____________________________________________________________________________________
Never miss a thing.  Make Yahoo your home page.
http://www.yahoo.com/r/hs
Reply | Threaded
Open this post in threaded view
|

Re: Deploy custom jasperreports in ofbiz

Ravi Subramanian
In reply to this post by Ravi Subramanian
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.

Reply | Threaded
Open this post in threaded view
|

Re: Deploy custom jasperreports in ofbiz

Mathius Allo
In reply to this post by Ravi Subramanian
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 <[hidden email]>
To: [hidden email]
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
Reply | Threaded
Open this post in threaded view
|

Re: Deploy custom jasperreports in ofbiz

Ravi Subramanian
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 <[hidden email]>
> To: [hidden email]
> 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

Reply | Threaded
Open this post in threaded view
|

Re: Deploy custom jasperreports in ofbiz

Mathius Allo
In reply to this post by Ravi Subramanian
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 <[hidden email]>
To: [hidden email]
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 <[hidden email]>
> To: [hidden email]
> 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 | Threaded
Open this post in threaded view
|

Re: Deploy custom jasperreports in ofbiz

Ravi Subramanian
Can u please suggest some documentation to look at for deploying the
jasperreports. I am new to ofbiz and that would be greatly helpful.

Regards,
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 <[hidden email]>
> To: [hidden email]
> 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 <[hidden email]>
> > To: [hidden email]
> > 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 | Threaded
Open this post in threaded view
|

Re: Deploy custom jasperreports in ofbiz

Ravi Subramanian
In reply to this post by Mathius Allo
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 <[hidden email]>
> To: [hidden email]
> 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 <[hidden email]>
> > To: [hidden email]
> > 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 | Threaded
Open this post in threaded view
|

Re: Deploy custom jasperreports in ofbiz

Ravi Subramanian
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 <[hidden email]>
> > To: [hidden email]
> > 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 <[hidden email]>
> > > To: [hidden email]
> > > 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
>