//entry in controller.xml
<request-map uri="SalesReport.pdf"><security https="true" auth="true"/>
<event type="groovy"
path="component://HCLBirt/webapp/HCLBirt/WEB-INF/actions/"
invoke="UserReport.groovy"/>
<response name="success" type="view" value="SalesOrderReportPDFFormat"/>
</request-map>
//groovy file starts
import org.ofbiz.base.util.*;
import java.sql.*;
/* BY Hardik*/
fromDateStr = parameters.fromOrderDate;
thruDateStr = parameters.thruOrderDate;
birtParameters = [:];
try {
birtParameters.fromDate = Timestamp.valueOf(fromDateStr);
birtParameters.thruDate = Timestamp.valueOf(thruDateStr);
} catch (e) {
Debug.logError(e, "");
}
request.setAttribute("birtParameters", birtParameters);
return "success";
// groovy file ends
-----Original Message-----
From: Mith Atul [mailto:[email protected]]
Sent: Thursday, March 24, 2011 2:11 PM
To: [email protected]
Subject: Re: How to run birt in ofbiz 10
Thnk's . I think if i have to use groovy i will have to setup it as event in
the <request tag of controller.xml (Am i right?) Also can u send me ur groovy
code !
On Thu, Mar 24, 2011 at 1:06 PM, Hardik Handa <[email protected]> wrote:
> I used groovy to pass my parameters. You Could try groovy as it is much more
> familiar if u have been working on ofbiz for a while.
> Though don't know much about using jsp tags.
>
> -----Original Message-----
> From: Mithun V Nair [mailto:[email protected]]
> Sent: Thursday, March 24, 2011 12:58 PM
> To: [email protected]
> Subject: How to run birt in ofbiz 10
>
> I did following:
> 1)used eclipse plugin to create birts .rptdesign file.
> 2)in controller created request & view to the above file.
>
> But cannot pass Report parameters to report.
>
> So I tried using jsp tags as in "birt.tld" .
> Can it work ?
> Which tags r compatible ?
> In short what's syntax in jsp to also pass report parameters.
> Thnk n adv!
>
> ::DISCLAIMER::
> ----------------------------------------------------------------------
> -------------------------------------------------
>
> The contents of this e-mail and any attachment(s) are confidential and
> intended for the named recipient(s) only.
> It shall not attach any liability on the originator or HCL or its
> affiliates. Any views or opinions presented in this email are solely those of
> the author and may not necessarily reflect the opinions of HCL or its
> affiliates.
> Any form of reproduction, dissemination, copying, disclosure,
> modification, distribution and / or publication of this message
> without the prior written consent of the author of this e-mail is
> strictly prohibited. If you have received this email in error please delete
> it and notify the sender immediately. Before opening any mail and attachments
> please check them for viruses and defect.
>
> ----------------------------------------------------------------------
> -------------------------------------------------
>