OverviewIn many cases, there will be more information needed for a body line (or group header, footer, etc.) than can fit within a single line. Report Desk provides the ability to specify multiple lines in those circumstances. By default, any row of output will have one line, but you have the ability to create multiple output lines also.
The following report has a single body line for the report output:
Adding a Line
However, you can click on the + , as highlighted above, to add a new line:
Notice that the new line has columns that match the columns on Line 1 (the red area above). This principle applies to all areas of the design that can have multiple lines: All lines following the first line will have columns matching the first line. Whenever you drag a column (or formula, etc.) to the new line, it will be placed in an existing column instead of adding a new column.
Specifying Data in a New Line
Now, lets change this new line by dragging and dropping a database column from the TreeView on the left:
Notice that the column heading is set to blank. If you leave it blank, it will keep the column headings in a single line. If you specify a column heading here, for example "Address", it will expand the column heading to two lines, where "Address" will appear directly under "Name" in the column heading of the report. The choice is yours.
Now, lets add another line for SLM_ADDRESS2 and run the report:
Notice the single-line column heading highlighted above and the multiple lines of information per record. Now, let's add column headings for the address columns:
... and run the report:
Notice the three-line column heading highlighted above.
Back in the designer, you may change the Format and Alignment for the column. Also, by pressing the Info button for that line, you can bring up the following dialog where you can optionally select Suppress Duplicates:
If you check Suppress Duplicates, the value will be replaced by spaces if the same column in the previous record has the same value.
Another option available for any line is Suppress line if blank:
When you select this option, the row of information will be suppressed if all column values are blank.
CSV/XLSX Rendering of Multiple Lines
Now, let's render this report to XLSX and see what we get:
Notice the Address columns in the spreadsheet. In this case, the rendering to XLSX displays the multi-line output vertically, down each line of a column, before moving on to the next column. This is the default behavior, and it works well in this example.
Rendering Lines Horizontally for CSV/XLSX
In some situations, you might want the lines to be rendered horizontally first. This can be achieved by selecting this option:
... yielding this result:
Different Column Headings for CSV/XLSX
In some situations, you might want to specify different column headings when rendering to PDF that you do when rendering to CSV or XLSX. The way to do this is to separate the two column headings with a Tilde (~) in the text:
Applying this change to SLM_ADDRESS1 and SLM_ADDRESS2 yields single-line captions for PDF output (because there is no text left of the Tilde), see below, and non-blank captions (the text right of the tilde) for CSV or XLSX output:
Inserting Body Lines
Normally, new lines are added at the end, by clicking on the + symbol after the last line tab. Sometimes, however, it might be helpful to be able to insert a line instead of adding one to the end. For Body lines, it is possible to insert a line before an existing line, except that it is not possible to insert a line before the first line. To insert a Body line, right-click on the tab and select the Insert new line here context menu item:
This will add a new Line 2 and renumber the remaining lines:
Modifying Body Line 1 Content
By default, dragging a database column, a formula, text, etc., on Line 1 inserts a new column into that line (and all subsequebt lines). On Lines 2 or higher, dragging something onto a row on the line updates the column content for that line instead of adding a new column. So, Line 1 defines the columns and the other lines simply use Line 1's defined columns. Similarly, Body Line 1 defines the columns for any group headers and footers and report footers.
But sometimes, you might want to preserve the column layout while updating a column's content on Line 1. To accomplish that, you can hold down the Control key while dragging and dropping the object from the TreeView to the desired row on the Line 1 tab. When you hold down the Control key to drag something onto Body Line 1, an Edit icon appears in the Line 1 tab, signifying that this will be an update instead of an insert.: