Text Element
  • 21 Jun 2023
  • 9 Minutes to read
  • Dark
    Light

Text Element

  • Dark
    Light

Article Summary

Intro

As the name suggests, the text element lets you add your custom text to your ancoreShare report. You can use this element to add headings for your report, page titles, or use the expressions editor to include time/date, KPIs, selected categories, or the author and recipients information to the report.

Besides these, you can also use the text element to specify headers and footers for your report. For example, you may want to add copyright information at the bottom of each page or add a category as a header. All this is possible with ancoreShare Extension.

The following sections explain how you can work with text elements to use their powerful functions.

Basic Settings

Add and select a text object and set general element properties.

Tip
While adding Qlik Objects to your report, use the pin icon to see the Preview window showing a preview of your report draft. Use the refresh button to see your changes in preview simultaneously.


Adding text element

  1. On your Sense sheet, select the ancoreShare button to which you want to add the element.
  2. On the properties panel, click Report Elements Add Element.
  3. Click on Type and select Text from the dropdown list.

NOTE: The Add Element button is always available at the bottom of the properties panel. For multiple elements, please scroll down to see the button.


Caption

When you add a text element, the caption is automatically populated as Text.
You can rename this field to provide a meaningful caption that will help you in navigating through your report elements.


Link to URL

The Link to URL field allows you to add a link to the text element. When the report is generated, the URL is embedded in it. Clicking the text on the report redirects the users to the URL specified here. This is particularly useful when you want users to access the live view of the object in the Sense environment (ensure they have sufficient access rights).

You can also use this to redirect users to a website, or any other kind of link.

NOTE: You will not be able to see or click the link in the Preview window. Download a draft report to verify the correct working of your link.

Calculation condition

In the Calculation Condition field, specify an expression to display the text element. It works just like the activation condition but is specific to each element. You can specify the value as a calculated formula. Refer to the Qlik documentation to know more.


Text element content

The text field is the area where you can specify the content that needs to go in your text element.

You can provide content for headings for your report or page titles, or any other text that you want.
Use the expressions editor to include time/date, KPIs, show sums, selected categories, or the author and recipients' information to the report.

Beneath the content field, you can set the alignment for the text content of the element.
To align the element as a whole go to Position.


Some Examples:

See the result for each example in the images below.

Date: Specify the expression as follows to add the current date to the report.

=Today()

Result:


KPI: Specify the expression as follows to add a KPI, such as the sum of sales to the report.

= num(Sum([Sales Amount]),'#.##0',',','.')

Result:

Combine expression with text: Specify the expression as follows to combine your text with a KPI.

= 'My KPI: ' &  num(Sum([Sales Amount]),'#.##0',',','.')

Result:


Text with line breaks: Specify the expression as follows to add a text with line breaks. For plain text, you can simply use the enter key on the keyboard to start a new line, just like in a text editor. To add line breaks in and expression,  use the "chr(13)" (Sense feature).

Line one,
line two,
line three.

Result:


Top 5 rank: Specify the expression as follows to populate the top 5 ranks from your selection. In this example, the expression will fetch the current selection (selected states), sort the values of their corresponding sales value, and lists the top 5 of them, creating a rank of the 5 top-selling states.

='TOP 5 STATES BY SALES' & chr(13) & concat({<[state_name] = {"=Rank(Sum([Sales Amount])) <=5"}>} DISTINCT [state_name],chr(13))

Result:


Refer to the Qlik documentation to know more about the expression editor.


Element Properties


Anchor

If there is another existing element on your sheet that comes before in order, you will see an Anchor tab. This setting defines the relative position of elements on the report page. Drag the orange box "B" to set the position of this text element with respect to the preceding element "A" or choose an anchor position from the drop-down list above.

To learn more about how all the positioning and sizing settings work together and affect each other, and how to precisely position the elements on your report by combining them, go to Positioning and Sizing elements.

If your element is within a cycle section, please refer to details in Positioning elements within a Cycle.


Position

Click the Position tab to define general position settings for the text element on your report.

  • Specify whether to place the text element in the Body or Header of the report page. Elements in the header will be repeated on every page.
    For example, use this setting to display a title or the date on every page of your report.
    NOTE: Elements positioned inside the header, are automatically repeated on every page of the report.
  • Optionally, select to Place element on new page to add a new page to the report and start with this there.
  • Use the alignment options to align the text element horizontally on the report page.
    NOTE: This property aligns the text element as a whole on the page. To align the text content itself inside the element go back to Basic Settings.

Size

Click the Size tab to set the type and width of the text element size on your report and the content overflow behavior of the text.
Type

Here, you can choose any of the following options:

  • Automatic: By default, the text element takes 100% of the page width.
  • Percentage of page size: Select this option to define the Width as a percentage of the report page.
  • Numeric value: Select this option to provide a specific Width value manually.
    By default, the width is measured in millimeters, but you can change the page unit in the Report Settings.
Content overflow

Specify how the text content is rendered in case it overflows the text element width. Choose from any of the following:

  • Hidden: The overflow is clipped, and the rest of the content will be invisible.
  • Ellipsis: Renders an ellipsis ("...") to represent the clipped text.
  • Line break: Acts like a word wrap and inserts a line break every time the text string would overflow the cell.
NOTE: The text element can only have a width, but no height. If Hidden or Ellipsis is selected, then the text element will just be as high as the one line of text is (depending upon the font size). For Line break, the text element will be as high as the content will fill it.
The image shows how the line break works to adjust the text within the element width.




Spacing

Click the Spacing tab to define the distance of the text element from neighboring elements on your report. You can do this separately for Left, Right, Top, and Bottom. The behavior of spacing depends on the selected size type.

  1. If you have set the size type as Automatic or Percentage of page size, then the spacing will act as padding and affect the visual size of the text element.
  2. If you have set the size type as Numeric, the spacing will act as a margin and affect the actual position of the text element.

Border

Click the Border tab to add a border around your text element and define the width (thickness) and color of this border.
As shown in the image, the border shows the placement of text elements on the report and the amount of space taken by each of them on the page

Tip
The border is particularly useful while working with multiple elements, as it forms an outer boundary for your object, and you can clearly see the actual position of various elements. Borders present a clear picture of which element takes how much space.



Sample:

Font

Click the Font tab to specify the font properties of the text element.

  • Font Family: Select one of the typeface options from the list.
  • Font Color: Use the color picker or provide a HEX code to choose the font color.
  • Fill Color: Use the color picker or provide a HEX code to choose a color that will fill the background of the text element.
  • Font Size: Specify the font size for the text. You can use the expression for dynamic sizing. 
  • Font Style: Set the style to Normal, Bold, Italic, or Bold Italic.

Please note, the font settings apply to the whole text element. To define specific font styles for different content types, add separate text elements for each type.

Here's a sample report with different styles for header, date, and content.


Cell Padding

Click the Cell Padding tab to define an inwards distance of text element content from the element boundary. You can do this separately for Left, Right, Top, and Bottom.

NOTE: The cell padding value is always specified in points (pt).


Note

You can add Notes to your text elements to provide additional information to your users.

For example, you can add notes for commenting on something, drawing attention to a specific area in the report, taking a note for yourself, giving some context for colleagues, adding information that is not in the title or legend of the chart, and so on.

To add a note:

  1. Specify the Title (optional) and Note in the corresponding fields.
  2. Alternatively, click fx to open the expression editor and provide the Title and/or notes using Qlik Expressions.
  3. You can also specify the Position of the note with respect to the object. Select the position from the four available options, top-left, top-right, bottom-left, and bottom-right.

If you generate a PDF report, then the notes are exported as actual annotations in the PDF file. Users with sufficient privileges can further edit them too, which enables active collaboration.

In the case of PPTX exports, the notes are shown in the Notes area at the bottom of each slide. As the PPTX does not show notes on objects, all the notes are shown collectively at the bottom. It is recommended to use Titles for notes to segregate them for each element.

NOTE: You will not be able to see the notes in the Preview window. You can download a draft report to see the notes.



Sample PDF with Notes

Sample PPT with Notes


TOC Table of Contents

If you added a TOC element to your report, you can choose for each other element, if it should appear in the table of contents or not. This might be useful to disable headers or paragraphs. You might also go for only enabling the header in the TOC instead of each object.

The following settings are available in this section:

  • Show element in TOC: This is enabled by default and also applies should the TOC be set to Bookmarks only.
  • Indent: The indent can also be set individually for each element in your TOC, creating a topic hierarchy. 
  • Label: By default the element's Caption is populated as a label in the TOC, but you can choose a separate one just for display in the TOC here. 
  • Font Style: This property can also be set individually for each element in this corresponding TOC menu of each element.

Not for Header Elements
These TOC settings are only visible, if the element is assigned to the Body of the report (default), not if it's in the Header. You can change this within your element's menu box under Position.



Deleting text element

At any time, you can click the Delete button to delete the text element.
Optionally, right-click the element in the properties panel and click Delete.




Next Steps:




Was this article helpful?

What's Next