Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

MySQL data to Word document via PHP

Options
  • 16-06-2006 10:46am
    #1
    Registered Users Posts: 1,821 ✭✭✭


    Just wondering can people point me in the right direction here. Have to retrieve data from a database and place it in a letter, like name and address. So want the name and address to be dynamic so can be printed off. Problem is most online tutorials just let you export the data as just a file itself. Just need a gentle push in the direction. Do I need a dynamic word template, and if so how can I do that? Or is it done some other way.

    Is it possible for you to do that so can print off copies of multiple letters in one go or must it be done indiviually? Or would I be better in doing this through a more complex programming language?


Comments

  • Closed Accounts Posts: 2,046 ✭✭✭democrates


    I seem to recall that word can use an odbc source for a mailmerge...


  • Closed Accounts Posts: 4,943 ✭✭✭Mutant_Fruit


    "Crystal Reports" is pretty much what you're looking for, but it ain't free. Try googling for free alternatives. You might find something here: http://www.control.com/1003948909/index_html


  • Registered Users Posts: 9,557 ✭✭✭DublinWriter


    "Crystal Reports" is pretty much what you're looking for, but it ain't free. Try googling for free alternatives. You might find something here: http://www.control.com/1003948909/index_html
    Crystal Reports can do mail-merges, but it's very akward, especially if the end-user wants to change the body of the letter.

    As one of the posters said, Word and ODBC are yer only men.


  • Registered Users Posts: 1,466 ✭✭✭Smoggy


    Quite a while back I did a piece of code that had to do dynamic cv's and save them to word , I found the easiest way was to output the data as If I was outputting to a web page and then change the mime type to word and saved it out to a file. I presume if you didnt want to save it I could have printed it off etc


  • Registered Users Posts: 43,913 ✭✭✭✭Basq


    iReports with JasperReports should do it!

    Have been working on an large-scale appointment application in Java for the past year (with a MySQL database) and this does a fantastic job - much recommended!

    And it's all free... FREE.... bwah hah hah hah!


  • Advertisement
  • Registered Users Posts: 68,317 ✭✭✭✭seamus


    Rich Text Format is a system of tags, like HTML. Provided that you're not looking to do anything overly extravagant with your formatting, it should be simple to output the data in RTF.

    That said, if it's a solution for yourself (and not something you need to roll out to 50 users), then Word + ODBC is your only man. You'll need to download an odbc driver from mysql.com to set up an odbc connection to MySQL.


  • Registered Users Posts: 1,821 ✭✭✭Skud


    cheers lads, thing is I have limited experience with ODBC/JDBC so this is gonna be a fun couple of week trying to get this sorted :D Google will help from here and my college notes. Thanks


Advertisement