Ask Your Question
1

LO Impress Slides linked to a LO Database

asked 2019-08-26 22:57:36 +0100

RajeevChatterjee gravatar image

updated 2019-08-26 22:59:09 +0100

Hello,

Is there a way to link data from a database (created in LO Base) to a LO Impress slide, so that each slide can display data sequentially and automatically?

I have a database of 500 records (7 fields per record). I created an Impress presentation with 500 slides to display the 7 fields from each record; one record on each slide. Each Slide is displayed for 5 seconds and then progresses to the next slide. Using forms and controls, having to manually enter the record numbers in the Data Navigator on each slide. But once we save and quit the link is lost. Next time I open the presentation all the slides show only the first record and not in the order it was last saved. For example, Slide 1 was to show Record 1, Slide 2 was to show Record 2, so on and so forth until Slide 500 which had to show Record 500. But when I save and reopen the presentation, all the 500 Slides show only Record 1.

I am not sure if this can be done normally, or should it be done with a Macro. I am a novice in LO Macro Programming. Any assistance will be greatly appreciated.

From my basic search, I could not find an equivalent question in the forum. However, if such a question has been asked before, I would request if I could be pointed in that direction. And my apologies if this is a repeat question, that has already been solved.

Thanks!

edit retag flag offensive close merge delete

Comments

Hello,

In the process of getting something working, and it appears macros may be the only solution, I have run into a number of problems.

It would help if you could provide a bit more information - your OS, specific LO version used and which database ( such as HSQLDB embedded, Firebird embedded, MySQL etc.)

Ratslinger gravatar imageRatslinger ( 2019-08-27 07:02:42 +0100 )edit

@Ratslinger, thanks for your response.

I am using OpenSuSe 42.2, LO 6.0, HSQLDB embedded.

I managed to find a round about but highly inefficient solution to this. However, if a macro or another efficient solution could be found, it would be really great.

Here is what I did: 1. Created a DB in Base, with 7 fields per record. 2. Created a Master Slide in Impress and inserted a Form which was connected to the DB created in Step 1, by linking Data Source to the registered DB. 4. In the Content Type, I selected Query. 5. I created a Query in Base to display all records of the dataset. In the Form Contents, I selected the Query name that I just created. 6. In the Filter section, I filtered based upon the primary key, which in my case, runs from 1 to 50. I just selected the ...(more)

RajeevChatterjee gravatar imageRajeevChatterjee ( 2019-08-27 09:49:08 +0100 )edit

@RajeevChatterjee,

You should convert your comment and post as an answer. The use of a macro is just as complicated as your process. No code is better if you can avoid.

The problem is that each slide acts as a new form and when data is displayed on a form the first record (from table or from a query) the first record is what gets displayed. Your process should work regardless if you filter the table or the query. The proposed solution I was attempting actually used filtering also and therefore needed this key to be stored on each slide anyway. In using LO v6.3.0.4 there were problems with slide data getting wiped out for editing. The Presentation still worked but any editing was gone.

Also, Impress is less friendly than other modules when it comes to macros. There are not any easy methods to execute code ...(more)

Ratslinger gravatar imageRatslinger ( 2019-08-27 18:32:29 +0100 )edit

@Ratslinger, Thanks for your advise. I shall do accordingly. I have also posted the answer accordingly. Thanks a lot.

RajeevChatterjee gravatar imageRajeevChatterjee ( 2019-08-27 21:04:21 +0100 )edit

@RajeevChatterjee,

Just a note. You can accept your own answer. Just click on check mark (upper left of answer in circle). Just click once - sometimes slow response; it will turn green when active.

Ratslinger gravatar imageRatslinger ( 2019-08-28 01:45:35 +0100 )edit

@Ratslinger, Thanks, I tried that but it says I need >20 points to accept or unaccept my own answer.

RajeevChatterjee gravatar imageRajeevChatterjee ( 2019-08-28 05:28:17 +0100 )edit

OK - now you have enough!

Ratslinger gravatar imageRatslinger ( 2019-08-28 05:38:27 +0100 )edit

@Ratslinger, Thanks. I have marked the same as advised by you.

RajeevChatterjee gravatar imageRajeevChatterjee ( 2019-08-29 09:23:41 +0100 )edit

1 Answer

Sort by » oldest newest most voted
1

answered 2019-08-27 21:02:56 +0100

RajeevChatterjee gravatar image

A round-about solution. This solution might be totally and absolutely inefficient, but it works.

Here is what I did:

  1. Created a DB in LO-Base (with 7 fields per record). Populated with about 50 records for testing purposes.
  2. Created a Master Slide in LO-Impress.
  3. In the Master Slide, inserted a Form which was connected to the DB created in Step 1, by linking Form->Data->Data Source to the registered DB.
  4. In the Form->Data->Content Type, I selected Query.
  5. I created a Query in LO-Base to display all records of the dataset (select * from tablename). In the Form->Data->Contents, I selected the Query name that I just created (It shows up in the drop-down box).
  6. In the Form->Data->Filter section, I filtered based upon the Primary Key, which in my case, runs from 1 to 50. In the Filter Dialog, I just selected the field name (of the Primary Key) and gave condition that it should be equal to 1.
  7. Inserted all the Fields into the Form, as required, and formatted/laid out as per preference.
  8. Made copies of the Master Slide. In the second Slide, I gave the Filter condition as equal to 2. In the third slide, Filter condition was equal to 3. So on and so forth.

I agree it is a very inefficient way to go about this solution, but once setup, it works. More importantly, after saving and closing the presentation, the links stay. And no macros were required.

The above solution was inspired by the following post: https://forum.openoffice.org/en/forum...

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2019-08-26 22:57:36 +0100

Seen: 62 times

Last updated: Aug 27