|  | 
|  | 
| 
| Re: Get Session Context through scriptin [message #58238 is a reply to message #56088] | Thu, 14 July 2005 07:19  |  | 
| Eclipse User  |  |  |  |  | At first to say thank you to Stavros for posting this topic to this newsgroup.
 
 It is not really neccessary to have the session in the script. This would
 only be a workaround for another problem: it is currently not possible to
 set
 the DataSource during runtime of an own program.
 
 However, because I needed a fast solution I switched to JasperReport
 library
 with iReport GUI Editor. JasperReport already provides the possibilities:
 
 1. during design time
 * to create template in GUI editor
 * use a DummyDataSource for designer
 * also use Objects as report parameter with scripted default value
 e.g. parameter["ReportUser"] = new DummyUser("Marco", "male")
 * write script to access parameter content
 e.g. parameter["ReportUser"].getName()
 
 2. during own application runtime
 * to load the template
 * set real DataSource
 e.g. to (DataSource) session.getAttribute("searchResult")
 * set real report parameter
 e.g. to session.getAttribute("currentUser")
 * create PDF with report
 
 IMO BIRT should go a similar way. JasperReport already offers me this
 possibilities. Moreover I can use multiple GUI editors all using the same
 *.jrxml structure.
 |  |  |  | 
Powered by 
FUDForum. Page generated in 0.05850 seconds