Ask Your Question
1

Refresh Writer ODBC Table Data [closed]

asked 2013-08-22 03:04:17 +0200

RealAg gravatar image

Hello,

I have created a document in writer where I have a table that is displaying the result of a Base query. The data is correct when I initially drop the query into the document. However, the document does not refresh the data by re-running the query when the document is opened. The only way I have found so far to refresh the data in the document body is to delete the table and drop it back in again. If I use the refresh button with the datasource window open(F4), the table in the datasource window updated correctly, but the data in the document body does not.

What can I do to fix this?

Thanks in Advance.

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Alex Kemp
close date 2015-11-07 12:50:58.243318

3 Answers

Sort by » oldest newest most voted
0

answered 2013-09-02 23:58:12 +0200

RealAg gravatar image

The answer to my problem was to make sure all form toolbars were on, make sure 'Use Wizards' was turned on using the 'Form Controls' toolbar. Then insert a table control using the wizard and configure the datasource to point at the query in my LO database.

edit flag offensive delete link more
0

answered 2013-08-22 20:58:51 +0200

m.a.riosv gravatar image

Menu/Tools/Update/Links

edit flag offensive delete link more

Comments

For me, Links is greyed out. Why would that be?

RealAg gravatar imageRealAg ( 2013-08-23 03:26:27 +0200 )edit

Please what options are not greyed out?

m.a.riosv gravatar imagem.a.riosv ( 2013-08-23 11:35:27 +0200 )edit

Menu/Tools/Update/Links is greyed out for me.

RealAg gravatar imageRealAg ( 2013-08-24 02:27:28 +0200 )edit
1

answered 2013-08-22 17:34:26 +0200

w_whalley gravatar image

With the datasource window open there are two refresh buttons. One refreshes the document table and the other (on the toolbar above the datasource section) refreshes the datasource table (at least in my LO 4.0.3.3). You can enter changes in either the document table or the datasource table then refresh the other to see the changes. Closing and reopening the datasource table also refreshed it. If you happen to have the source .odb document opened then you need to refresh it separately (or close/reopen the table in the .odb document).

You specified ODBC in your question. I tested this with the embedded HSQLDB database and with MySQL (using the native connector).

edit flag offensive delete link more

Comments

I'm running LO 4.1.0.4. The query I am running resides in Base, but the data resides in a MySQL database connected using ODBC. In my version, the refresh button that opens with the datasource window refreshes the table in the datasource window. I do not have a second refresh button anywhere. Can you tell me which toolbar it is on?

RealAg gravatar imageRealAg ( 2013-08-23 03:24:46 +0200 )edit

I believe it is on the Form Navigation toolbar. An alternative is to add a push button control whose action is to refresh the form.

w_whalley gravatar imagew_whalley ( 2013-08-23 14:44:01 +0200 )edit

I have this feeling that I am not embedding this data into the document correctly. I am dragging the query from the left pane of the datasource window and dropping it into the document. Is that the correct way to do it? either that, or there is an option somewhere the I need to reconfigure...............

RealAg gravatar imageRealAg ( 2013-08-24 02:55:41 +0200 )edit

Dragging the query inserts a copy of the current state of the query. Try inserting a table control instead. Toolbars on: Form Controls;Form Design;Form Navigation. Design mode on. In Form Controls click on More Controls. Click on Table Control. Drag the cursor over a space in your document to make space for the table. Choose your data source, query and fields. This links the table control to the data source so that the updating works as described above.

w_whalley gravatar imagew_whalley ( 2013-08-24 15:44:00 +0200 )edit

I don't see where it is possible to configure a table control to point at a datasource

RealAg gravatar imageRealAg ( 2013-08-29 02:29:26 +0200 )edit

What version are you using? In LO 4.0.3 when I insert a table control into a new .odt document I get a Table Element Wizard dialog that lets me choose the data source. Older versions (not sure when it changed) don't have the wizard. In that case, edit the form, right-click the table control and choose Form from the context menu then the Data tab. You can then choose a data source from those registered. You may then need to add data columns manually.

w_whalley gravatar imagew_whalley ( 2013-08-29 15:10:51 +0200 )edit

Looks like I have it now. Your last comment about the wizard was very helpful. I had the wizards turned off on the 'Form Controls' toolbar. Using the wizard to create the table showed me how to properly configure the datasource.

Thanks for hanging in there with me!

RealAg gravatar imageRealAg ( 2013-09-02 23:00:22 +0200 )edit

Question Tools

1 follower

Stats

Asked: 2013-08-22 03:04:17 +0200

Seen: 684 times

Last updated: Sep 02 '13