• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to print bill invoice  RSS feed

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have entered data into database and calculated its amount now i want to display it in word ..how???
 
Bartender
Posts: 1952
7
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've moved your post to our Java in General forum as this doesn't seem to be related to JSP technology and I feel you may get more useful replies there.
As for your question, if you're looking to generate MS Word compatible documents you'll need to look into libraries that can help you achieve that, like Apache POI, OpenOffice UNO or Aspose's Java Components.
 
Bartender
Posts: 10575
66
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
arun jha wrote:i have entered data into database and calculated its amount now i want to display it in word ..how???

Well, before you can display it in Word (and I assume you meant Word - as in Microsoft Word - not 'word'), you're going to need to be able to display in Java; so I'd concentrate on that part first.

Winston
 
arun jha
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can't we write a piece of code in jsp to fetch records from db and while displaying in it word cant we write in .. response.setContent(application/msword)
 
Winston Gutkowski
Bartender
Posts: 10575
66
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
arun jha wrote:can't we write a piece of code in jsp to fetch records from db and while displaying in it word cant we write in .. response.setContent(application/msword)

Quite possibly, but you're getting way ahead of yourself. Deal with problems one at a time.

Another problem you'll run into is that Word (and you STILL haven't told us whether you are, in fact, talking about MS Word or not) is a piece of proprietary software; and Microsoft don't want you using it without paying them lots of money; so whatever you come up with is likely to have restrictions.

Winston
 
Jelle Klap
Bartender
Posts: 1952
7
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Winston Gutkowski wrote:
Another problem you'll run into is that Word (and you STILL haven't told us whether you are, in fact, talking about MS Word or not) is a piece of proprietary software; and Microsoft don't want you using it without paying them lots of money; so whatever you come up with is likely to have restrictions.


Although that was a pain with the old binary format it's far less of a problem with OOXML nowadays.
 
arun jha
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi Winston ...for that reason we can use pdf format ..and from their we can print it...or option like sending to ms one note()
 
Winston Gutkowski
Bartender
Posts: 10575
66
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
arun jha wrote:hi Winston ...for that reason we can use pdf format ..and from their we can print it...or option like sending to ms one note()

I still say that whatever format you end up with, you must be able to display it in Java first. Right now, your thoughts are miles off in the distance and you're not dealing with your basic problem - how to get the data from the database into Java.

When you've done that (and can prove that it works), then deal with how you translate it to wherever you want it to go.

Winston
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!