hiwe have started our main project for the last year at university, and we are going to create a database. We really want to use java ofcourse../ I want to use java:)

So I have made some tests and figured out how to use access and jtables etc.. Now theres only one last problem, this application has to be able to make lots of lots of reports on the data that the user put in the database. The business we are doing this for have been using excel as a database and excel actually crashed because they had too much in it

And they used word templates i think as the reports..

Now, doed anyone here have a tip for how we can solve this problem.. Is it possible for java to create a .doc file based on a word template? I really hope so, cause else i think we have to go do the whole project in access:-[ and do the coding in VB

Would be really nice if Java could read word templates and fill in the data and print it Iknow theres alot of programs that are made for this that you can plug in to java but we want to know if its possible to solve with the jdk first.

Now, doed anyone here have a tip for how we can solve this problem.. Is it possible for java to create a .doc file based on a word template? I really hope so, cause else i think we have to go do the whole project in accessEmbarassed and do the coding in VB Embarassed

Other options include this, or just generating a pdf like a real man! No wusy Word documents! Bah! I could recite the precise PDF data structures from memory! What kind of MCSE weenie do you know that can do that with Word documents?

Tell me at least you're using custom ISAM files for your database?

Now if you'll excuse me, I need to go curl up in a corner. It's scary out here. ;-)

1. 2. Were not using access and excel, the corporation that needs our help have been using it thats why they need our help and we want to do it in java NOT plastic-programminglanguage vb..3.i once created a word doc from vb code and i wanted to know if thats possible in java (to create a text document from a template, were talking about alot of templates here..and 1 or their customer reports that they want to create can be up to thousands of pages with info about the data in the database..4.We havent even started thinking about making e/r diagrams yet,were using the pmi model5.Just to make sure you dont think im a mcse weenie, I HATE vb,access,and love Java..the one were working for have been using office and were supposed to fix their troubles with Java..6.You answered all my questions7.Thank you

- find an API that does all the work for you - write an API to do all the work for you

Since many many groups have tried and failed to do the latter, I suggest you don't bother. You would need to reverse engineer the file-formats, including all their bugs (IIRC MS still hasn't released spec documents for their file formats, and keeps them "secret").

There are plenty of attempts to make API's to create word docs, edit them, alter them, etc, but - as noted above - most don't work. Good luck; you need it.

PS what you're probably looking for is an API that presents a DOM (document-object model) of word docs + some useful utitilies (like "instantiate new doc from template").

Off the top of my head, surprisingly most of the API's have java versions. Although a higher percentage are Python (or some mangling language like Perl) IIRC.

The corporation were doing this for said that they dont care about what language we use,what database we use, because its all going to be new for them anyway, and anyway its a lastyear school project so we can choose to not use word.. I mean, we can use openoffice docuements as templates if that makes it easier..

What we need to be able to do is to fill out parameters in template documents and print them out from the java program. And I think maybe that apache jakarta project is the solution, but i havent tested that yet..I will test if its possible to read a docuement..for example a open office document template and fill in the data.

Sounds like what you need is a 4gl report generation language implemented in java.

Are these report templates they're using especially complex? Because if its just a page heading, column headings, and totals then that simplifies things greatly. Also, a .txt file is almost always sufficient for these reports in my experience.

A 4gl of this nature can more straight to implement than a BASIC varient. With java it could access files over networks and on multiple architectures. I've not done it myself though .

its not just totals we need to insert lists..its not just a text file, i dont think that will be good enough these reports are what they send to the customer for analysis etc..theyr bending pipes by induction and they send test results etc and offers...they showed us 1 offer for 1 customer and it was 3 "books" with paper...basically theres a heading etc and a list of items that can vary from 1 page to manymany pages

its not just totals we need to insert lists..its not just a text file, i dont think that will be good enough these reports are what they send to the customer for analysis etc..theyr bending pipes by induction and they send test results etc and offers...they showed us 1 offer for 1 customer and it was 3 "books" with paper...basically theres a heading etc and a list of items that can vary from 1 page to manymany pages

I highly recommend ditching the Word idea and going for PDFs. You'll produce nicer looking reports, and you won't have to deal with bugs in the format implementation. Not to mention that PDFs are far better supported by third party tools, portable across platforms, and can't be edited by the end user. :-)

java-gaming.org is not responsible for the content posted by its members, including references to external websites,
and other references that may or may not have a relation with our primarily
gaming and game production oriented community.
inquiries and complaints can be sent via email to the info‑account of the
company managing the website of java‑gaming.org