Report Desk: Multiple Lines
Version: 8.6
Overview
In 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.An Example
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
Let's look at another example. If you run the UDR G/L Distribution Code List it will produce this PDF output:
When you choose to send it to XLSX, by default, it looks like this:
The columns were rendered down the first column (showing all Account Number values), then down the next column (showing all the Description values) and finally down the last column (showing all the Dist % values). Clearly, rendering the columns across each line first looks better:
This can be achieved by checking the Render XLSX horiz checkbox on the Designer screen:
Different Column Headings for Spreadsheet Output
In some situations, you might want to specify different column headings when rendering to PDF than 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 Column Heading 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:
Skipping CSV/XLSX Columns
If there is a column defined in a multiline report that has all of the following conditions, it will not be included when rendering to CSV or XLSX format:- The column titles for each of the lines is blank (i.e., blank, or ends with "~").
- There are no database fields defined in this column in any of the lines.
- There are no formulas defined in this column in any of the lines.
When the output is PDF, there will be a column with a blank heading and text as defined in each row (1 LB, 2 LBS, etc.). When the output is sent to CSV or XLSX, this column will be skipped because there are no headings, nor any database fields, nor any formulas in any of the lines for this column. Note that there is a text string in the column in each row, but that does not cause the column to be preserved in CSV/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.:
JEG
UDRDesign