How to call BIRT report [message #1097758] |
Fri, 30 August 2013 06:04 |
sruthi santhy Messages: 4 Registered: August 2013 |
Junior Member |
|
|
Hello sir,
I have a jsp page, to enter two dates. On submit, this dates are captured in a servlet. I pass these dates to a method in a class which connect to database and retreive data for that particular date period.
What i did not understand is, now from where i can call my BIRT report that displays that retreived data? and how?
My jsp:
<body>
<form name="we" action="DataFetchServlet" method="post">
ENTER FROM DATE <input type="text" id="datepicker" name="fromDate" value='01-Mar-2013'/> <BR>
ENTER TO DATE <input type="text" id="datepicker" name="toDate" value='07-Aug-2013'/> <BR>
<input type="submit" value="SUBMIT">
</form>
</body>
My servlet:
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// TODO Auto-generated method stub
String fromDate=request.getParameter("fromDate");
String toDate=request.getParameter("toDate");
int i=0;
System.out.println(fromDate);
System.out.println(toDate);
ArrayList<String> a=new ArrayList<String>();
String query;
query=QueryClass.getQuery(fromDate,toDate);
a= new ConsolidatedDateRetreive().makeConnection(query);
}
Now in servlet as per the code, retreived data is captured in array list "a".
Now how can display this in my BIRT report. From where the BIRT report is called and how?
Kindly help me at the earliest.
Thanks and Regards,
Sruthi
|
|
|
Re: How to call BIRT report [message #1100878 is a reply to message #1097758] |
Tue, 03 September 2013 18:40 |
|
You can call the birt report through the birt viewer by url, you can call the report embedded in jsp using the birt viewer tag library, or you could run the report using a java class, then displaying the rendered output within your application however you'd like.
Michael
Developer Evangelist, Silanis
|
|
|
Powered by
FUDForum. Page generated in 0.02591 seconds