Bug 158045 - mail merge: data sources not updated when opening the file
Summary: mail merge: data sources not updated when opening the file
Status: NEEDINFO
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.3.7.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-11-02 15:26 UTC by walter
Modified: 2023-11-20 10:01 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description walter 2023-11-02 15:26:23 UTC
datasource/data put into document via mail merge cant be updated.


OS:
Win 11 PRO; Version 22H2 Build 22621.2506

Libre Writer:
Version: 7.3.7.2 (x64) / LibreOffice Community
Build ID: e114eadc50a9ff8d8c8a0567d6da8f454beeb84f
CPU threads: 8; OS: Windows 10.0 Build 22621; UI render: Skia/Raster; VCL: win
Locale: de-AT (en_AT); UI: en-GB
Calc: CL


my usecase is that I document client sessions into a calc sheet, cause its super quick and easy. this .ods file is my data source.

From time to time I have to print my documentation and archive it.

for this I use writer with the mailmerge feature.

I have set up a document, where all the data gets filled in.


my intended way of working with this would be, that when I open my .odt file with the mail merge applied, it should recognise that the data source file was altered and ask me if the data should be reloaded and updated, so all I have to do is (proof read and) to print it out.

If thats to hard, it would be nice if the "refresh"/"rebuild" button in the Data -Sources Toolbar (ctrl+shiftF4) would do exactly that, refresh the data from the file, so when I alter the source, for instance add some new values/rows, they should get pulled into writer Data-Sources, so I can instantly export them via mail merge.



at the moment the problem is that there is no way to update the data, without completely deleting the data source and running trough the whole mail merge wizard. yes it works, but its so cumbersome if I find and fix stuff and have to constantly delete and re-add the .ods file trough the wizard.

Coming from Adobe InDesign I feel lost here, I did extensive googling and reading, but couldn't find any solution, only reports of the problem.
Is there any way you could help me and all the others looking for a solution?
Comment 1 Stéphane Guillou (stragu) 2023-11-17 21:19:40 UTC
Thanks for the report!

I can't reproduce: using an ODT with fields attached to data stored in an XSLX file, I could later on add data to the XLSX, then open the ODT and Save Meged Documents: it would use the new data automatically. No prompts, but extra data is used without requiring extra action.

Please try the following:
- Update to a currently supported version (7.6)
- If the data source has moved or changed names, you can use in Writer: Edit > Exchange Database. That should allow you to point to the data source without having to go through the Wizard again.
- If you can still reproduce the issue, maybe provide example files as attachment for us to test in more similar conditions.

Let us know if that helps.

Tested in:

Version: 7.3.7.2 / LibreOffice Community
Build ID: e114eadc50a9ff8d8c8a0567d6da8f454beeb84f
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 5fe2bf914c251009ec4709fa8fdc45c3b53f676b
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded
Comment 2 walter 2023-11-19 13:45:55 UTC
I upgraded to

Version: 7.6.2.1 (X86_64) / LibreOffice Community
Build ID: 56f7684011345957bbf33a7ee678afaf4d2ba333
CPU threads: 8; OS: Windows 10.0 Build 22621; UI render: Skia/Raster; VCL: win
Locale: de-AT (en_AT); UI: en-GB
Calc: CL threaded

made a new data ods file
made a new writer file,
where I manually added the database via "Exchange Database", with shift+ctrl F4 I opened the data sources menu and drag dropped the placeholders, but didn't get the mail merge panel, where I can preview and save versions of my dataset. so I ran the wizard and then it popped up. I ran a test save and it worked.

then I closed the ods, modified and saved it. reopened the odt AND IT WORKS, i can switch trough all the new data. Works as expected.

the old files still dont work,
if I use "exchange database" it accepts the files and it works,
but as soon as i save, close, reopen the file, I have to redo it, I cant register the ods manually as a database as it only accepts odb files and throws "the connection to the datasource couldnt be established. no SDBC driver was found for the URL".

so I removed the placeholders from my files and saved under a new name, reopened them and followed the procedure which i described above. now it works.

so I dont know if it was due to the older version or my new approach to implement it, now it works good enough for me, the refresh/rebuild button still doesnt load changes to the ods file, for that i have to close the odt, but then the changes are immediately available. this working would be lovely to have as well.
Comment 3 QA Administrators 2023-11-20 03:11:49 UTC
[Automated Action] NeedInfo-To-Unconfirmed
Comment 4 Stéphane Guillou (stragu) 2023-11-20 10:01:36 UTC
(In reply to walter from comment #2)
> didn't get the mail merge panel, where I can preview and save versions of my
> dataset. so I ran the wizard and then it popped up. I ran a test save and it
> worked.
You can also toggle the panel with View > Toolbars > Mail merge.

> then I closed the ods, modified and saved it. reopened the odt AND IT WORKS,
> i can switch trough all the new data. Works as expected.
> 
> the old files still dont work,
> if I use "exchange database" it accepts the files and it works,
> but as soon as i save, close, reopen the file, I have to redo it, I cant
> register the ods manually as a database as it only accepts odb files and
> throws "the connection to the datasource couldnt be established. no SDBC
> driver was found for the URL".
> 
> so I removed the placeholders from my files and saved under a new name,
> reopened them and followed the procedure which i described above. now it
> works.
> 
> so I dont know if it was due to the older version or my new approach to
> implement it, now it works good enough for me
Good to know that it does work well for new files, which is the most important.
About older files where the connection does not survive a save-reopen, you'd have to attach example files (ODT and data source) for us to test, if you don't have personal data in it or can sanitize one. Ideally, we'd have steps to reproduce from scratch (how to create such a file that fails updating the fields).

> the refresh/rebuild button
> still doesnt load changes to the ods file, for that i have to close the odt,
> but then the changes are immediately available. this working would be lovely
> to have as well.
Which "refresh/rebuild" button is that?