In my document I am using database fields in order to print labels. There are 2 columns and 6 rows corresponding to the 12 frames where the labels should appear.
At the end of each frame i inserted the field "Next Data Record".
My address is inserted on the top of each label by means of a hidden text field.
The condition to hide the text looks like: Name == ""
This works fine as long as there are enough selected records to fill the page.
If there are fewer records, in all remaining frames there appears my address in the first line of each frame. I suppose that if there is no next data record, the condition Name == "" is not calculated correctly (it should be true), so that the text (the address) is not hidden. I tried alternate expressions like Name == NULL but this did not resolve the problem.
Please attach a document and give clearer reproducible steps (preferably enumerated). Marking as NEEDINFO. Once you do the above mark as UNCONFIRMED.
Created attachment 106832 [details]
Database with 2 records
This file contains 2 records to be used by the second file
Created attachment 106833 [details]
This file shows the problem
This file contains database fields connected to TestDat1
There are 2 files:
A calc-file „TestDat1“ with two data records
an odt-file „DemoErrorInCondition“ with some database fields.
What I mean can be reproduced by the following steps:
1) Add TestDat1 to the available databases
2) Load DemoErrorInCondition
3) Show the table T1 of TestDat1 (F4)
4) Select the two data records
5) Choose Data In Fields:
The hidden text in data record 2 is hidden as expected, because the condition Name==““ is TRUE
6) Select only one data record (the first)
7) Choose Data In Fields
The hidden text in data record 2 is not hidden although there is no name as no further data record is available
Did this work in previous LibreOffice / OpenOffice versions?
The evaluation of the condition from the point of LO is correct: Name==““ is just true, if there is a dataset and the value of the column Name is an empty string.
The correct test for a missing datapoint is !Name.
I guess setting the condition to '!Name || Name == ""' matches your expected result.
And BTW - there is File => New => Labels, which might help you to set up the initial label document.
Thank you for your effort, but this does not solve the problem.
Using !Name || Name=="" ends up in hiding the text, although it should be shown if there are data available and Name is not empty.
From my notes, years back, I read that you must use
!<name datasource>.<name table>.<name field>
<name datasource>.<name table>.<name field> EQ ""
I found it not easy to set conditions for various fields/needs, but this worked.
NB Would you like to hide one line, then keep in mid the difference between Line end (SHft+Enter), which is inserted by the wizard, and Paragraph end (Enter) which is what you need.
Also, pls consider to first ask for user-support. For example there is a group of users with a great variety of skills that can offer help with questions:
But maybe you did :)
This bug is still present in LO 6.
So I suggest, that using conditional text together with database fields (merge fields), should be looked at.
A condition like database.table.field != "" should return FALSE , if no further datasets are available. This is the way Microsoft Word handles such a case.
(In reply to Carlo from comment #8)
> A condition like database.table.field != "" should return FALSE , if no
> further datasets are available.
When I do a mail merge with labels, I never have that more labels than the available record sets are filled.
So I don't understand what you want / where that condition would be used for.
(In reply to Cor Nouws from comment #9)
> Hi Carlo,
> (In reply to Carlo from comment #8)
> > A condition like database.table.field != "" should return FALSE , if no
> > further datasets are available.
> When I do a mail merge with labels, I never have that more labels than the
> available record sets are filled.
> So I don't understand what you want / where that condition would be used for.
this applies to the case, that in the conditional text the sender address is placed. All remaining labels on the page should not show the sender address, just for later use.
(In reply to Carlo from comment #10)
> this applies to the case, that in the conditional text the sender address is
> placed. All remaining labels on the page should not show the sender address,
> just for later use.
> Regards Carlo
Ah, now I get it. Sorry for being so slow of understanding (and busy).
Set as enhancement.