File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSP and the fly likes reports- Urgent, please help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "reports- Urgent, please help" Watch "reports- Urgent, please help" New topic

reports- Urgent, please help

Leandro Oliveira
Ranch Hand

Joined: Nov 07, 2002
Posts: 298
I've gotten to create a report, but this report must be perfectly well on the paper, the client will see it in his browser and then click somewhere to print. What do you sugest?? should I send the report in pdf format??? My only problem is: how can I control the pages size??? can I control the page size if I use pdf format??? Please help me!!!
Joe Broderick

Joined: Apr 23, 2003
Posts: 23
what program are you using to generate the repost. is this report being displayed on a jsp page? what i do under these circumstances is try and filter everything out but the text, and then do minimual formatting so it prints out in blocks. if you give me a bit more information, i will try and offer better suggestions.
Leandro Oliveira
Ranch Hand

Joined: Nov 07, 2002
Posts: 298
it looks like I've gotten to code a program that generates the report, In my case, I'm not supposed to use crystal reports (for example) I've gotten to create my own 'crystal reports'. That generates good reports. To do this I was thinking about creating a pdf file and sending to somebody (the invoker of the report server) the file in pdf format. What do you think??? is it too difficult to code???
Chris Baron
Ranch Hand

Joined: Mar 21, 2003
Posts: 1061
Hi leandro,
you can use FOP to generate the PDF.
I used a trick recently:
Instead of parsing the *.fo-File from *.xml and *.xsl, i wrote a *.jsp ...with db-connection and loops etc... that outputted xsl-fo instead of html.
xsl-fo syntax:
( took about one day to paint a page in required coporate design, quite html-like )
On the jsp i got an inputstream via and sticked it into FOP
( first link i posted )
Another pdf-tool is iText:

hth cb
[ May 09, 2003: Message edited by: Christian Baron ]
I agree. Here's the link:
subject: reports- Urgent, please help
jQuery in Action, 3rd edition