Feature Proposal: Fully support summary lines on tables derived from searches
Motivation
Often a search generates a table, one in many cases one wants to produce a summary line at the bottom of that table showing, e.g., totals for the generated table columns (using
SpreadSheetPlugin).
However, this only works if the search returns a result. If the search did not return any result, the table will be messed up. (This is also discussed on
EmptySearchAndSpreadsheetProblem.) See this example:
Description
In all situations (i.e., whether the search does or does not return a result, table cells added immediately after a table generated by a search should render correctly as part of the generated table.
--
ThomasWeigert - 01 Jun 2005
Documentation
Additional parameter for %SEARCH:
When
nofinalnewline is
on, any text continuing immediately after the search variable on the same line will be rendered as part of the table generated by the search, if appropriate.
Examples

Don't work unless this feature is installed...
Modified (nofinalnewline="on", summary continues in same line)
%TABLE{sort="on" initsort="1" initdirection="down" headerrows="1" footerrows="1"}%
| *Topic* |
%SEARCH{ "Location" nofinalnewline="on" casesensitive="on" regex="on" nosearch="on" nototal="on" web="Main" limit="3" format="|$web.$topic|"}%| Total: %CALC{"$ROW(-2)"}% |
%TABLE{sort="on" initsort="1" initdirection="down" headerrows="1" footerrows="1"}%
| *Topic* |
%SEARCH{ "Xocation" nofinalnewline="on" casesensitive="on" regex="on" nosearch="on" nototal="on" web="Main" format="|$web.$topic|"}%| Total: %CALC{"$ROW(-2)"}% |
Modified (nofinalnewline="on", summary on new line)
%TABLE{sort="on" initsort="1" initdirection="down" headerrows="1" footerrows="1"}%
| *Topic* |
%SEARCH{ "Location" nofinalnewline="on" casesensitive="on" regex="on" nosearch="on" nototal="on" web="Main" limit="3" format="|$web.$topic|"}%
| Total: %CALC{"$ROW(-2)"}% |
%TABLE{sort="on" initsort="1" initdirection="down" headerrows="1" footerrows="1"}%
| *Topic* |
%SEARCH{ "Xocation" nofinalnewline="on" casesensitive="on" regex="on" nosearch="on" nototal="on" web="Main" format="|$web.$topic|"}%
| Total: %CALC{"$ROW(-2)"}% |
Traditional (Summary on new line)
%TABLE{sort="on" initsort="1" initdirection="down" headerrows="1" footerrows="1"}%
| *Topic* |
%SEARCH{ "Location" casesensitive="on" regex="on" nosearch="on" nototal="on" web="Main" limit="3" format="|$web.$topic|"}%
| Total: %CALC{"$ROW(-2)"}% |
%TABLE{sort="on" initsort="1" initdirection="down" headerrows="1" footerrows="1"}%
| *Topic* |
%SEARCH{ "Xocation" casesensitive="on" regex="on" nosearch="on" nototal="on" web="Main" format="|$web.$topic|"}%
| Total: %CALC{"$ROW(-2)"}% |
Implementation
I have implemented this feature with a flag to search. I do believe that this should be the standard behavior of search.
In
SVN 4345.
Added doco
SVN 4348.
Discussion: