[Solved] Impress Slides linked to a Database

Discuss the presentation application
Post Reply
RajeevChatterjee
Posts: 6
Joined: Mon Aug 26, 2019 10:35 pm

[Solved] Impress Slides linked to a Database

Post by RajeevChatterjee »

Hello,

Is there a way to link data from a database (created in OO Base) to an 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 OO 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!
Last edited by RajeevChatterjee on Tue Aug 27, 2019 9:12 pm, edited 1 time in total.
OpenOffice 4.1 + OpenSuSe 42.2
User avatar
RoryOF
Moderator
Posts: 34570
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Impress Slides linked to a Database

Post by RoryOF »

Why not use a custom report from the database as your "slide"? Some simple macro code ought permit updating the "slide"; no need to add the complexity of interfacing the database to Impress.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
RajeevChatterjee
Posts: 6
Joined: Mon Aug 26, 2019 10:35 pm

Re: Impress Slides linked to a Database

Post by RajeevChatterjee »

RoryOF wrote:Why not use a custom report from the database as your "slide"? Some simple macro code ought permit updating the "slide"; no need to add the complexity of interfacing the database to Impress.
Can that be done? However, I am not sure how to do it.

Basically I want each record to be displayed for about 5 seconds and then move on to the next record. I thought Impress might be the best option. Any guidance will be very helpful.
OpenOffice 4.1 + OpenSuSe 42.2
RajeevChatterjee
Posts: 6
Joined: Mon Aug 26, 2019 10:35 pm

Re: Impress Slides linked to a Database

Post by RajeevChatterjee »

RajeevChatterjee wrote:
RoryOF wrote:Why not use a custom report from the database as your "slide"? Some simple macro code ought permit updating the "slide"; no need to add the complexity of interfacing the database to Impress.
Can that be done? However, I am not sure how to do it.

Basically I want each record to be displayed for about 5 seconds and then move on to the next record. I thought Impress might be the best option. Any guidance will be very helpful.
Just adding on to my previous reply: If we think of it as a concept. OO Impress can do great things. If someone wanted to create a visually appealing presentation with some data linked to a database in each slide, so that the data need not be manually entered for each slide, can it be done?

I agree on your views about using a customised report. But such a report will be limited in its usage when compared to a visually appealing presentation slide. Just some thoughts. Thanks!
OpenOffice 4.1 + OpenSuSe 42.2
User avatar
RoryOF
Moderator
Posts: 34570
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Impress Slides linked to a Database

Post by RoryOF »

If you are setting up a sequential display of 500 record entries, I think a report structure will be adequate. A 5 second timer to trigger display of the next "slide" ought be relatively simple. I cannot see that using a fancier presentation method, such as the facilities of Impress allow, will matter significantly.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
User avatar
RoryOF
Moderator
Posts: 34570
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Impress Slides linked to a Database

Post by RoryOF »

Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
User avatar
Villeroy
Volunteer
Posts: 31264
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Impress Slides linked to a Database

Post by Villeroy »

Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
User avatar
RoryOF
Moderator
Posts: 34570
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Impress Slides linked to a Database

Post by RoryOF »

This
https://stackoverflow.com/questions/175 ... ase-values
discusses how to link MS Powerpoint to a database. It may serve as a template for linking Impress to a database.

Bear in mind that the OO/LibO BASIC differs in some aspects from that used in Powerpoint.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
RajeevChatterjee
Posts: 6
Joined: Mon Aug 26, 2019 10:35 pm

Re: Impress Slides linked to a Database

Post by RajeevChatterjee »

RoryOF wrote:This
https://stackoverflow.com/questions/175 ... ase-values
discusses how to link MS Powerpoint to a database. It may serve as a template for linking Impress to a database.

Bear in mind that the OO/LibO BASIC differs in some aspects from that used in Powerpoint.

Thank You!

Interesting solution, but needs to be converted to OO/LO Macros. Something I am not an expert at. Hopefully, someone can point me in the right direction. Thanks again.
OpenOffice 4.1 + OpenSuSe 42.2
RajeevChatterjee
Posts: 6
Joined: Mon Aug 26, 2019 10:35 pm

Re: Impress Slides linked to a Database

Post by RajeevChatterjee »

Very interesting and excellent approach. Thank you for sharing.

However, I still could not figure out if I can link one slide to one record. And each subsequent slide would then point to the next record and so on. Probably I am missing something.

Would something like this work (not tested, just asking out of curiosity)?
- One main form linked to the database
- One sub-form for each slide, with SQL Query which links to individual records

Above method, if it works at all, will require creation of n number of slides manually and linking each slide to a record manually as well. But once done, the records should stay linked hopefully, because it is linked with a SQL Query. Any change in the database table would automatically reflect in the slides. Am I right in this understanding?
OpenOffice 4.1 + OpenSuSe 42.2
RajeevChatterjee
Posts: 6
Joined: Mon Aug 26, 2019 10:35 pm

Re: Impress Slides linked to a Database

Post by RajeevChatterjee »

RajeevChatterjee wrote:
Very interesting and excellent approach. Thank you for sharing.

However, I still could not figure out if I can link one slide to one record. And each subsequent slide would then point to the next record and so on. Probably I am missing something.

Would something like this work (not tested, just asking out of curiosity)?
- One main form linked to the database
- One sub-form for each slide, with SQL Query which links to individual records

Above method, if it works at all, will require creation of n number of slides manually and linking each slide to a record manually as well. But once done, the records should stay linked hopefully, because it is linked with a SQL Query. Any change in the database table would automatically reflect in the slides. Am I right in this understanding?
Finally managed to get something working.

Thanks @Villeroy for pointing me in this direction. I got the idea after reviewing your solution - linking impress with calc and base.

My method might be totally and absolutely inefficient, but it works.

Here is what I did:

1. Created a DB in Base (with 7 fields per record). Populated with about 50 records for testing purposes.
2. Created a Master Slide in 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 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 set it works. More importantly, after saving and closing the presentation, the links stay. And no macros were required.

If better and simpler solutions exist, do advise me. Thanks again to all for the super assistance.
OpenOffice 4.1 + OpenSuSe 42.2
Post Reply