Bug 52586 - Mail Merge doesn't seem to respect a standard data sources filter - steps in Comment 4 (workaround: use filter in address list)
Summary: Mail Merge doesn't seem to respect a standard data sources filter - steps in ...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
(earliest affected)
3.5.0 release
Hardware: All All
: medium normal
Assignee: Not Assigned
Depends on:
Blocks: Mail-Merge
  Show dependency treegraph
Reported: 2012-07-27 14:18 UTC by Joshua
Modified: 2023-11-22 13:57 UTC (History)
13 users (show)

See Also:
Crash report or crash signature:


Note You need to log in before you can comment on or make changes to this bug.
Description Joshua 2012-07-27 14:18:55 UTC
Using the standard filter when doing a mail merge does not appear to affect the output of the merge at all. I've tried multiple databases and files with this.

To reproduce:

1. Add fields from a data source.
2. Add a filter. (Note: the filter will work in the data browser/viewer, giving the impression that it will work in the merge.)
3. Complete the merge (to a document or printer, it doesn't appear to matter.) All the records seem to be in place, without respecting the filter that has been applied.
Comment 1 Alex Thurgood 2012-07-27 17:09:36 UTC Comment hidden (obsolete)
Comment 2 Roman Eisele 2012-10-05 08:41:54 UTC Comment hidden (obsolete)
Comment 3 Dan 2012-11-07 03:39:28 UTC
I've just installed Going through the mail merge wizard exhibits exactly the behaviour that the OP describes. Using File > Print and choosing the option to print to a file, the filter appears to work correctly.
Comment 4 Mirosław Zalewski 2013-03-07 18:20:32 UTC
There are detailed steps to reproduce:

1. Open new text document
2. From menu: View → Data sources
3. In upper part of window, select "biblio" table
4. Set standard filter to Author = 'Gris, Myriam'
4a. Five rows will remain, identifiers GRM00 to GRM04
5. From menu: Insert → Fields → Other...
6. In Database tab, select Mail Merge fields on left, Bibliography → biblio → Identifier on right; Insert. Close this window.
7. From menu: Tools → Mail Merge Wizard...
8. Go directly to step 6 ("Edit document").

Identifier field on document will change to "ARJ00", which is NOT visible in Data Sources table. You can cycle through all 20 default biblio table entries.

Expected result:
mail merge wizard should take filter into consideration and work only on rows matching filter settings (that are shown in Data Sources table).

Yes, I know, expected behavior is arguable (should filter just help finding matching data or actually change a range on which mail merge works?). But this is what original reporter expects. I also got personal message from other user who also finds current behavior broken.

This is in no way related with 50800 mentioned earlier. That one is about Base queries, this one is about Mail Merge in Writer.

I could reproduce it on 3.6.5, Debian testing amd64; therefore I mark this as NEW and change OS setting. I also lower importance to comply with <https://wiki.documentfoundation.org/images/0/06/Prioritizing_Bugs_Flowchart.jpg>.
Comment 5 Alex Thurgood 2014-08-08 11:53:42 UTC Comment hidden (obsolete)
Comment 6 Alex Thurgood 2014-08-08 12:10:13 UTC
Step ^ of the wizard is currently lacking a UI dialog, so testing on master somewhat difficult.

The workaround, and the way I have always done this :

1) Set the filter in the data source broswer window.
2) Select the upper left corner of the data source browser and drag and drop this onto the empty Writer document
3) The other mailmerge wizard will start and only copy over the filtered data - the user gets to decide which fields to insert
Comment 7 Alex Thurgood 2015-01-03 17:41:23 UTC Comment hidden (no-value)
Comment 8 GeBo 2015-01-10 20:19:52 UTC
I can confirm this bug is still active. I use Lubuntu 14.10 with LO Build ID: 430m0(Build:2)

Like Joshua said, I can also filter correctly when using File / Printer, but using the Wizard it always shows the first records.

When I filter in Base, then filtering works as expected.

Recap, Having 6 records, filtering the 4th, 5th and 6th in writer:

File / Printer (to file) gives me record 4, 5 and 6.
Wizard gives me record 1, 2 and 3.

Filtering in Base, wizard gives me record 4, 5 and 6.
(But this would take an extra step, which is not very user friendly.)
Comment 9 paour 2015-07-20 07:42:33 UTC
I encounter the same probleme today and I read in an old documentation (French documentation for mail merge OpenOffice document 14.10.2007 http://www.openoffice.org/fr/Documentation/Guides/GuidePublipostage.odt page 25 and 27) that this bug affect "mail merge wizard" and not "mail merge".
1-If I use a query to change my selection and if I click next after have edit my document (Mail merge wizard 7- Personnalise document), the  preview, print and save merge document (Mail merge wizard 8-Save, Print or sent) are wrong.
2 If I use a table and a filter to do the same, the  preview, print and save merge document are wrong.
Workaround since 14.10.2007, use "mail merge" instead off "mail merge wizard" and query or filter work normally.
Hope it's help you to resolved this (old) bug
Comment 10 QA Administrators 2016-09-20 10:18:37 UTC Comment hidden (obsolete)
Comment 11 Yahoo Serious 2016-12-30 13:26:02 UTC
I can confirm that this behavior is still present in LibreOffice 5.2.3, it does not respect the filter when merging.

PS: Miroslaw suggests the expected behavior is arguable.  
I would personally definitely expect the filter to change the range on which mail merge works. I think this is more intuitive than queries and prevents inexperienced users having to write Base-queries.
Else the only use for the filter is to find matching data, and I can only imagine that being useful in rare cases where you have to check/preview the merge for a specific case.
Comment 12 Nicolas R 2017-03-13 17:57:46 UTC
Bug always present in 5.2.6 / Win 8.1 Pro 64 

The buttons in the new Mail Merge toolbar ("Edit Invidual Documents", "Save Merged Documents" etc...) don't take in account any filter or even sort order done through the "Data Sources" window ( Ctrl-Shift-F4).

It's really annoying and disturbing for end users because filter / sort in Data Sources window is easy and safe ( easier and safer than modifying a query in the database).
Comment 13 Timur 2017-07-14 14:46:25 UTC Comment hidden (obsolete)
Comment 14 Nicolas R 2018-03-02 18:43:16 UTC
(In reply to Timur from comment #13)
> This bug is about standard data sources filter. Looks like there's a
> workaround: use filter in Select address list, step 3. of Mail Merge Wizard.

Yes, but it's a workaround only for filter, no workaround for sorting.

It will be really fine if the buttons in the Mail Merge toolbar could use filter / sort options of DataSources toolbar ... and less unsettling
Comment 15 QA Administrators 2019-03-03 03:42:12 UTC Comment hidden (obsolete)
Comment 16 michael 2020-07-12 07:54:53 UTC
dont't know if this is the right way.

So, for me the bug is still open.
Version,, 7.0RC1

And Mail Merge doesn't even accept the result of a query inside the database nor the filter set inside the data explorer.

Sorry, if this should be the wrong way.

Comment 17 derfred 2021-01-29 13:02:23 UTC Comment hidden (me-too)
Comment 18 derfred 2021-01-29 13:08:55 UTC
Sorry, for the duplicate but I did not actually fill in the header bit for the post. Not sure, how important it is...

This bug is still open for me on Win10

I found out that the filter will be carried on to the print windows, if I filtered the _table_ in the data source window.
If I, however, select a query in the data source window it does not carry on to the printing window (after approving mail merge).

May be that helps to narrow it down a bit.
The database I am using is a text-based database (link to .ods
Comment 19 Thierry Munoz 2021-05-18 14:30:06 UTC

I confirm that this issue stil affects LibreOffice :
Version: / LibreOffice Community
Build ID: 10(Build:2)
CPU threads: 8; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: fr-FR (fr_FR.UTF-8); UI: fr-FR
Ubuntu package version: 1:7.1.3~rc2-0ubuntu0.20.04.1~lo1
Calc: threaded

This fonctionnality was very useful and now, the mailing is an important weakness of LibO for a professionnal use.


Comment 20 QA Administrators 2023-05-19 03:17:17 UTC
Dear Joshua,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)

If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword

Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team