Apache OpenOffice (AOO) Bugzilla – Issue 73831
"NextRecord" breaks conditional formating
Last modified: 2017-05-20 11:19:47 UTC
Hello, querying the bugs database i found some bugs regarding the problem, that using the "NextRecord" field command (Feldbefehl in german) breaks the evaluation of conditional formating. As i found, all issues are marked as "fixed", but in my constellation, the problem still exists. I have a database (tried ODBC, csv, Calc-table; no difference) with some records containing accounting info. I created a writer document with a table with enough rows to hold the maximum possible records for one bill. Each table row (=database record) should be preceded by a little text. When the records are less than the number of rows, the row of course shouldn't contain this text. So i defined a conditional text like database.table.field NEQ "" "Preceding Text " ELSE "". This is ok until the _last_ record is retrieved. In all subsequent rows following the _last retrieved_ record, they evaluate like the last one did. IMO, when the "end-of-file" is reached, evaluating the conditionals are stopped. Reproducing this issue is very simple and works for all versions of OOo: 1) Create a CSV file containing some fields (lets assume "Name" and "Street") and enter two (2) records: "Bugsbunny";"Top of the hill" "Donald Duck";"Somewhere" 2) Make a data connection to access the csv file in Writer 3) Create an empty Writer document, insert a table with five(!!) rows and three columns. 4) Drag'n'drop "Name" to the first col on each row, "Street" to the third. 5) In column two insert a conditional text like db.table.Street EQ "Somewhere" "this shouldn't happen" ELSE "". 6) After the database field "Street" in each of the five rows insert the "NextRecord" field (not in the last row, but that doesn't matter). 7) Print and you will see. Row three to five have "this shouldn't happen" in column two as the last printed record evaluated to this.
Reassigned to ES.
Please attach a sample document and database.
Created attachment 42462 [details] Testdrive with all needed files.
The zip-file contains all needed files to reproduce the bug. - report.csv contains the data - report.odb is the database description. I think, you have to adjust the path. The "database" is the flat csv-file "report.csv", UNICODE, Fieldseparator ";", Textseparatort '"', first line contains column names. - report.odt is the document containing the reporting table. The databasefields are addressed as "report.report.fieldname" - report.ps is the printed output of the report.odt as - of course - postscript.
As described. I can't find out why this fails.
This bug still exists in OOo 3.1.0. No tried to use the nativ postgresql database with the JDBC driver on MacOSX. The conditional formating still doesn't work. After printing the last record, all following table rows should be empty - the conditional formating of the paragraph is defined to hide if the (a) database field is not set (=empty). Tried "NOT db.tab.field" and "!db.tab.field" as "db.tab.field == """ and "db.tab.field EQ """ and so on. Nothing triggers the "hide paragraph" condition when the last record is retrieved.
Reset assigne to the default "issues@openoffice.apache.org".