- 21 Jun 2023
- 9 Minutes to read
- Print
- DarkLight
Text Element
- Updated on 21 Jun 2023
- 9 Minutes to read
- Print
- DarkLight
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.
Adding text element
- On your Sense sheet, select the ancoreShare button to which you want to add the element.
- On the properties panel, click Report Elements > Add Element.
- 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.
CaptionWhen you add a text element, the caption is automatically populated as Text. | |
Link to URLThe 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 conditionIn 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 contentThe 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. Beneath the content field, you can set the alignment for the text content of the element. |
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 | |
AnchorIf 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. | |
PositionClick the Position tab to define general position settings for the text element on your report.
| |
SizeClick 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.TypeHere, you can choose any of the following options:
Content overflowSpecify how the text content is rendered in case it overflows the text element width. Choose from any of the following:
The image shows how the line break works to adjust the text within the element width. | |
SpacingClick 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.
| |
BorderClick the Border tab to add a border around your text element and define the width (thickness) and color of this border. 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: |
FontClick the Font tab to specify the font properties of the text element.
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 PaddingClick 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). | |
NoteYou 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:
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 ContentsIf 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:
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 elementAt any time, you can click the Delete button to delete the text element. | |
Next Steps:
- Now add Charts, Tables, or Lines to your report
- Learn more about positioning all elements
- See a report draft in the preview window
- Or, share and export the report