Tip: Add separators to reports

Add separators between fields — essentially, line breaks — anywhere you like in your reports by following the steps of this tip.

Our big release in November improved many long-standing requests related to reports. It enabled you to send formula-driven emails, use a formula to determine what fields to include in a report and added many new options for reports using comma-separated (CSV) or tab-separated (TSV) values.

However, a fair number of long-standing feature requests have not yet been addressed. The biggest is likely the PDF report designer we have promised for an embarrassingly long time now. While we have nothing new to announce regarding the PDF report designer, there are compelling third-party alternatives that can easily be used with Calcapp, as detailed by this blog post from 2020.

Another feature our customers have requested for years concerns the ability to add separators to reports, that is, line breaks between groups of fields. PDF reports automatically separate different screens (optionally with headings for each and every screen), but sometimes it’s desirable to have line breaks without having to create a new screen.

We recently made some minor changes which enable this exact functionality, meaning that you can now introduce line breaks wherever you like by following these steps:

  1. Add a new text field. Select abc from the inspector after you have pressed Add field (which creates a number field).

  2. Make the field invisible by toggling the Visible property in the inspector, so that the separator does not show up in the user interface of your app.

  3. Assign the field a label equal to a single space character. If the field is the second separator of the screen, use two space characters, and so on. This is important, as you otherwise get unsightly “ (2)”, “ (3)” labels in your report (which normally serve to differentiate fields with identical labels, but here they need to be suppressed by using ostensibly different labels).

  4. Assign the formula " "" " to the separator fields.

  5. Add a new report button, by pressing Add button and then selecting something like Open report from the drop-down in the inspector that initially reads Reset field. You need to include invisible fields by toggling the Include hidden fields property, so that the separator fields are included.

The steps above have the effect of adding fields with labels and values which are only made up of invisible space characters. This isn’t particularly elegant, but it works.

We are aware that many customers expect reports to include everything in a screen, including text boxes, buttons and field group separators (which would have made this tip superfluous). This is something that we will realize in a future release.

For now, though, this tip enables you to add field separators to reports anywhere you like.

« Release: Our November, 2021 update is now available