Graham,
This is great but would it be possible to see a bit more? I am completely in the dark about how the report is added to the web application. What must happen? what does the JSF page code look like? I can see how to generate the report but how to I transfer that to the client machine? I am afraid I am a bit of a newbie when it comes to report generation and printing.
Thanks
Glenn
Graham Stark <[EMAIL PROTECTED]> wrote:
Glenn,
Don't know if this is any good to you, but here's an excerpt from one
I've just finished:
....
FacesContext context = FacesContext.getCurrentInstance();
HttpServletResponse response = (HttpServletResponse)
context.getExternalContext().getResponse();
response.setContentType( "application/pdf" );
response.setHeader(
"Content-disposition",
"attachment;filename=AnnualReport_"+model.getYear()+".pdf");
OutputStream out = response.getOutputStream();
reporter.writeReport( out );
FacesContext.getCurrentInstance().responseComplete();
....
where the reporter is a little class that wraps the Jasper reports code.
Graham
> All,
> I am looking at Jasper reports but I am unsure the best way to
> integrate Jasper Reports into a My Faces Application. Any help would
> be greatly appreciated. If you are able to help and you come to NYC at
> any time, the beer is on me!
>
> Thanks
>
> Glenn
>
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
--
Graham Stark, Virtual Worlds
phone: (+044) 01908 618239 mobile: 07952 633185
Homepage http://www.virtual-worlds.biz/people/graham_s
Virtual Chancellor http://www.virtual-worlds.biz/vwc
Discover Yahoo!
Get on-the-go sports scores, stock quotes, news & more. Check it out!

