Ask Your Question
1

Mail merge from MySQL source with LO Base Query

asked 2016-10-06 00:12:23 +0100

cscj01 gravatar image

Five years ago, I created a query in an OO database and used that query to populate some documents in Writer. Now I have to do the same thing again with updated data. The only problem is, I don't remember how to get the source to be the query I set up in Base. Here is the detail.

  1. I have a database set up in MySQL in 3rd normal form
  2. I created some views to select the correct data
  3. I created a query to access the views to retrieve the data
  4. I created a Writer template as my merge document
  5. I defined the query as my source (I cannot remember how I did this step)
  6. I successfully ran the merge

I have tried opening an existing database as a source, but that does not give me access to the LO queries. I have tried connecting to an existing MySQL database, but I have the same problem; no accesss to the LO queries.

Perhaps there is someone out there who can tell me how to accomplish this, i.e., use the query output directly as my merge source.

edit retag flag offensive close merge delete

Comments

What OS, what versions of OO and LO ?

rautamiekka gravatar imagerautamiekka ( 2016-10-06 00:27:46 +0100 )edit

Also what version of MySQL server and is it MySQL or MariaDB? Thanks.

EasyTrieve gravatar imageEasyTrieve ( 2016-10-06 19:42:27 +0100 )edit

2 Answers

Sort by » oldest newest most voted
0

answered 2016-10-06 01:00:34 +0100

Ratslinger gravatar image

updated 2016-10-06 01:48:01 +0100

Your database must first be registered. From the menu Tools->Options->LibreOffice Base->Databases. Once registered, the query is available from menu View->Data Sources or Ctl-Shift-F4. It doesn't matter which database you use (embedded, split, MySQL, etc) you should have access once it is registered.

Edit: Can't understand why you are not seeing them. Here is my Base (connected to MySQL) and a Writer doc showing same queries available in both: image description

edit flag offensive delete link more

Comments

Just to sure of what I believe you are saying - you have a Base file connected to a MySQL DB; the Base file has Queries based upon Views/Tables from the MySQL DB; the Base file is registered with LO. Is this correct? If so that is what is shown in my answer.

Ratslinger gravatar imageRatslinger ( 2016-10-06 01:59:32 +0100 )edit
0

answered 2016-10-06 01:36:09 +0100

cscj01 gravatar image

updated 2016-10-06 03:33:39 +0100

I did register the database. Sorry, I left that step out in my post. But I see no queries from my LO registration. If I use either connect to or existing source, I can see the tables in the MySQL database, but what I need to see are the queries I have defined in LO for the database.

Edit: Your screen shot is what helped solve this. I recalled I had the old databases in a different location when I initially did this. I actually moved (copied and deleted after making sure things were okay) the data to the new location. The queries were no longer in the original DB. There for a minute I thought I was losing my mind. Thanks for the help. It might have been a week before I caught the obvious error.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

2 followers

Stats

Asked: 2016-10-06 00:12:23 +0100

Seen: 164 times

Last updated: Oct 06 '16