Hidden paragraph reverts on print or export

Discuss the word processor

Hidden paragraph reverts on print or export

Postby MPEcho » Thu Sep 17, 2020 2:00 am

Greetings all:

I have a number of documents with conditional paragraphs. If a database field is empty, one paragraph appears, if the field is populated, that paragraph is hidden and another appears.
The formulation for the paragraph to hide if field blank is ![database-name.Query-name.Field]
If the field is populated then that paragraph should show, and the alternate paragraph is hidden with [database-name.Query-name.Field]

This works correctly when viewing on the screen. The problem comes when I save the file, print the file, or export to PDF, the condition is ignored and the result is as if the database field were empty. Has anyone seen this before?

Thanks for any thoughts
Libre Office 5.1.6.2 Ubuntu 16.04
MPEcho
 
Posts: 99
Joined: Wed Sep 07, 2016 11:30 pm

Re: Hidden paragraph reverts on print or export

Postby FJCC » Thu Sep 17, 2020 2:17 am

I have never used this feature but I see that there is a setting for printing hidden text. In my OpenOffice version it is under Tools -> Options. I expand the Writer list on the left and select Print. I can then see a check box for Hidden Text. Is that selected in your case?
Windows 10 and Linux Mint, since 2017
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
FJCC
Moderator
 
Posts: 7789
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Re: Hidden paragraph reverts on print or export

Postby MPEcho » Thu Sep 17, 2020 6:38 pm

FJCC wrote:I have never used this feature but I see that there is a setting for printing hidden text. In my OpenOffice version it is under Tools -> Options. I expand the Writer list on the left and select Print. I can then see a check box for Hidden Text. Is that selected in your case?


Thanks for the reply. That isn't the issue. I dont want to print hidden text, I want to print only the visible text, the problem is it switches what text is hidden. So imagine a letter for example. There are two versions: like this
Version 1 "Thank you for your order, your order number is <nnnnn>. Please remember this number." {Hide paragraph if no order number}
Version 2 "Thank you for your order, your order is being processed. Please provide the requested information to receive your order number . . ." {Hide paragraph if there is an order number}

When the document is opened, no information has been merged in, so Version 2 of the paragraph is visible. When merged, if there is a order number, then Version 2 is hidden and version 1 is displayed with the number filled in. So far so good. But when I go to export as a PDF, the document ignores the condition and switches back to showing Version 2 and not 1, even though filled in.
Libre Office 5.1.6.2 Ubuntu 16.04
MPEcho
 
Posts: 99
Joined: Wed Sep 07, 2016 11:30 pm

Re: Hidden paragraph reverts on print or export

Postby MPEcho » Thu Sep 17, 2020 11:46 pm

I may have an insight, not an answer.

Part of what is going on here may be based on info I didn't think to include. The document is set up to "mail merge" from two separate queries. So taking my example above, the "order number" would be filled out as part of query 1. Query 2 would fill in name and address info for multiple addresses, such as "these people will get a copy of the shipping information: " then listing an ad hoc number of names and addresses linked in a one to many relationship to the "Order" (Note, my use isn't really about orders, it is project management, but sticking with my example in this thread)

It appears that order of execution somehow matters. In very limited testing, if query 2 is selected in data sources when converting to PDF, it seems to work. If query 1 is selected (the one triggering hidden paragraphs) it doesn't work correctly. If this continues to work, then I have a work around at least. My problem now is that the behaviour I am observing makes no sense at all.

I don't really think this is solved. So I'll leave it unmarked in case it gets seen by someone with a better understanding of what is going on. (That understanding might help me come up with a more predictable useage.)
Libre Office 5.1.6.2 Ubuntu 16.04
MPEcho
 
Posts: 99
Joined: Wed Sep 07, 2016 11:30 pm


Return to Writer

Who is online

Users browsing this forum: No registered users and 18 guests