[Solved] Open Writer doc with database fields for a letter

Discuss the database features

[Solved] Open Writer doc with database fields for a letter

Postby Shuttleu » Thu Apr 02, 2015 12:22 am

Hello.

I have just started using OO (been using Microsoft Office for years) and I have hit a bit of a wall.

I have a Base database with a single table, this single table has simple info in it (name, address, etc.). I have a form which allows me to view and edit this info.
All well and good so far.

My problem is when I try to use the information from the database in a letter.
I have written a letter in Writer, selected the fields to use from "Data Sources (F4)" and when I choose to print, I then select the rows to use and print them.
What I want to do is, from the form in Base, press a button, it opens the Writer file and when I press print it just prints the row that I was on in Base.

I dont want to have to select the rows to print when I press print, I want it to print the row that I was viewing/editing.

Is this possible?
Last edited by Shuttleu on Fri Apr 03, 2015 11:46 pm, edited 1 time in total.
OpenOffice 4.1.1 on Mac OS X
Shuttleu
 
Posts: 3
Joined: Thu Apr 02, 2015 12:11 am

Re: Open Writer doc with database fields for a letter

Postby dreamquartz » Thu Apr 02, 2015 5:31 pm

You might want to look at: https://forum.openoffice.org/en/forum/v ... 13&t=75488.
This info helped me with both business cards and letters.

Dream
LO 5.x and OO 4.x on Windows 7 PRO & Ubuntu 16.04 LTS.
dreamquartz
 
Posts: 633
Joined: Mon May 30, 2011 4:02 am

Re: Open Writer doc with database fields for a letter

Postby Shuttleu » Thu Apr 02, 2015 6:17 pm

dreamquartz wrote:You might want to look at: https://forum.openoffice.org/en/forum/v ... 13&t=75488.
This info helped me with both business cards and letters.

Dream

Thats not quite what I was after, looking at that, they are talking about printing multiple letters at once with proceeding records.

What I'm after is the following.

I am on my form, I am editing record #25.
I press a button on my form which opens a Writer document with information from record #25 taken straight from the database.
OpenOffice 4.1.1 on Mac OS X
Shuttleu
 
Posts: 3
Joined: Thu Apr 02, 2015 12:11 am

Re: Open Writer doc with database fields for a letter

Postby F3K Total » Thu Apr 02, 2015 7:12 pm

Hi,
find attached an example containing two files.
Because i wanted to show a way without macro, you have to click twice within the form.
  • register the database file Adresses_report_single_row.odb -> Tools/Options.../OpenOffice Base/Databases/New ...
  • Open Adresses_report_single_row.odb
  • Rightclick on Form Addresses -> Edit
  • Rightclick on Pushbutton open Writer -> Control ... -> Tab General
  • select Action: Open document/web page
  • click on the three dots most right from URL -> select the writer file Report_current_row.odt
  • Close properties window
  • Save the form, close the form
  • Ready, open the form by doubleclick, select a name in the Listbox top left, click the button save Name , click open Writer Print ...
R
PS: to understand, you can read [Example #1] Filter/Search with Forms (leveraging SubForms)
Attachments
Adresses_report_single_row.odb
(80.92 KiB) Downloaded 63 times
Report_current_row.odt
(9.77 KiB) Downloaded 62 times
    MMove 1.0.6
  • Extension for easy, exact positioning of shapes, pictures, controls, frames ...
    my current system
  • Windows 7 OOo, AOO, LOLinux Mint OOo, AOO, LO
F3K Total
Volunteer
 
Posts: 895
Joined: Fri Dec 16, 2011 8:20 pm

Re: Open Writer doc with database fields for a letter

Postby Shuttleu » Thu Apr 02, 2015 9:16 pm

F3K Total wrote:Hi,
find attached an example containing two files.
Because i wanted to show a way without macro, you have to click twice within the form.
  • register the database file Adresses_report_single_row.odb -> Tools/Options.../OpenOffice Base/Databases/New ...
  • Open Adresses_report_single_row.odb
  • Rightclick on Form Addresses -> Edit
  • Rightclick on Pushbutton open Writer -> Control ... -> Tab General
  • select Action: Open document/web page
  • click on the three dots most right from URL -> select the writer file Report_current_row.odt
  • Close properties window
  • Save the form, close the form
  • Ready, open the form by doubleclick, select a name in the Listbox top left, click the button save Name , click open Writer Print ...
R
PS: to understand, you can read [Example #1] Filter/Search with Forms (leveraging SubForms)

Thank you for your reply, That is exactly what I was after.
OpenOffice 4.1.1 on Mac OS X
Shuttleu
 
Posts: 3
Joined: Thu Apr 02, 2015 12:11 am

Re: Open Writer doc with database fields for a letter

Postby dreamquartz » Fri Apr 03, 2015 10:57 pm

I like F3K Total's solution too.
I use my method approx. the same way you needed.
I print a file, select the one I need from the list, and end up the same way. I can, however, select more than one name at the time to print multiple letters as well.
F3K Total's is very user friendly.

Good luck,

Dream
LO 5.x and OO 4.x on Windows 7 PRO & Ubuntu 16.04 LTS.
dreamquartz
 
Posts: 633
Joined: Mon May 30, 2011 4:02 am


Return to Base

Who is online

Users browsing this forum: No registered users and 8 guests