Similar to a word processing document, a text box is an object that holds text (a single character, a single word, entire sentences, or paragraphs). Editing in a text box is just like working in a word processor. You can cut, copy and paste selected text easily, and format the text as needed. In addition, a text box can hold other components.
Text boxes are only supported in page reports that are created using query resources.
Below is a list of the sections covered in this topic:
- Inserting Text Boxes in a Page Report
- Formatting Paragraphs
- Formatting Text
- Finding or Replacing a Text String
- Importing and Exporting Text
See an example: The SampleComponents catalog, included with Logi JReport Designer, contains reports that have examples of how each component type could be used in a report. For the text box example, open
A text box can be inserted in the page report areas listed in Component Placement.
To insert a text box into a page report, use either of the following ways:
- Select Insert > Text Box or Home > Insert > Text Box. If the mouse pointer is in the report body or a tabular cell, a text box will be inserted there upon finishing. Otherwise, you need to select the mouse button in the desired location to place the text box there.
- From the Components panel, drag to the desired location in the page report which allows the insertion of a text box, and a text box will then be created.
After a text box has been inserted into a page report, you can double-click it to input text.
Paragraphs are created when text is entered into a text box. In Logi JReport, you can easily format the paragraphs, for example, the alignment style, indentation format or line spacing. To do this:
- Right-click anywhere in the paragraph and select Paragraph on the shortcut menu. The Format Text dialog appears.
- In the Paragraph tab,
- To specify the alignment style of the paragraph, select the required option from the Alignment drop-down list: left, center, right or justified.
- To set the indentation formats of the paragraph, in the Indentation box, specify the left and right indent distance in the Left and Right fields. If you want to set the paragraph to be indented, select first line or hanging from the Special drop-down list, then input a number in the By text box. This will create a first-line indent or hanging indent in the paragraph using the inputted number as the indent distance.
- To adjust the spacing before or after the paragraph, enter the required amount of spacing in the Before or After field.
- To change the spacing between the lines in the paragraph, select the required item from the Line Spacing drop-down list. If at least, exactly or multiple is selected, enter the required amount of space or the number of lines in the At box.
- When done, select OK to accept the changes.
You can also set the indentation formats of a paragraph by simply moving the tap stop icons on the ruler. To do this, position the mouse pointer anywhere on the paragraph, then,
- To create a first-line indent or hanging indent, drag to the position where you want the text to start.
- To change the left indent, drag to the position where you want the paragraph to start.
- To change the right indent, drag to the position where you want the paragraph to end.
The text you enter into a text box can be formatted to suit your requirements. For example, you can change the font size, color, alignment, and highlight the text with a distinguishing color. To do this:
- Select the text you want to format, right-click and select Font on the shortcut menu.
- In the Font tab of the Format Text dialog, specify the font settings.
- Select OK to accept the changes.
You can also format the selected text by corresponding commands on the Format tab.
To find a character string in a text box:
- Right-click anywhere in the text box and select Find a String from the shortcut menu.
- In the Find tab of the Find and Replace dialog, specify the string you want to search for and set the other settings as required.
- Select the Find Next button to start finding the specified string.
Similar to finding text, if you want to replace a string in the text box with another one,
- Right-click anywhere in the text box and select Replace from the shortcut menu, the Find and Replace dialog will then be displayed with the Replace tab selected.
- Specify the settings according to your requirements and select the Replace or Replace All button to replace the next or all the specified string with another one.
To import text into a text box from an external file (.txt or .rtf):
- Position the mouse pointer at the location where you want to insert the imported text, then right-click and select Import External File.
- In the Import a File dialog, select the .txt or .rtf file you want to import and select OK.
The text of the file is inserted in the text box.
To export the text from a text box:
- Position the mouse pointer on the text, right-click and select Save to RTF File.
- In the Save RTF File dialog, specify the name of the file and select OK.