- Getting Started
- Administration Guide
-
User Guide
- An Introduction to Wyn Enterprise
- Document Portal for End Users
- Data Governance and Modeling
- Working with Resources
- Working with Reports
- Working with Dashboards
- View and Manage Documents
- Understanding Wyn Analytical Expressions
- Section 508 Compliance
- Subscribe to RSS Feed for Wyn Builds Site
- Developer Guide
TextBox
TextBox control is the most extensively used report control by the users. It is an input box that can be used to write any text in a report or display any textual data. For example, you can use a textbox to write the title of the report or to display any data.
By default, all the cells of the Table and Tablix report control have textboxes. Also, when you drag and drop the fields from a dataset onto the report designer, text boxes are created automatically. You can edit and format the text in the textbox as well.
To add a TextBox in a Report Designer
Follow the below steps to add a textbox.
From the Report Toolbox on the left, drag and drop the TextBox control onto the design area.
Now add the content. You can either type the text directly into the textbox or you can select the fields and bind the fields to the dataset.
You can also use expressions in the textbox. Right-click the textbox and select the option Expression.
Binding data to a TextBox
Follow the below steps to bind data to a textbox.
Method 1
From the Report Toolbox on the left, drag and drop the TextBox control onto the design area.
Select the textbox and from the fields selection adorner , select a field from the list. If a numeric field is selected, then by default the Sum of the numeric field is taken. If the field selected is non-numeric, then the count of the field is taken. In the image below, we have taken two textboxes, one has a numeric field and another has a non-numeric field.
Method 2
From the Report Toolbox on the left, drag and drop the TextBox control onto the design area.
From the Data Binding tab on the right, expand the dataset and drag-drop the desired field(s) onto the textbox. In this example, the report uses the InsuranceDataSet and we have dragged and dropped the Payout and Gender fields.
Method 3
From the Data tab on the right, click the Select Fields button next to the bound dataset and select the desired fields.
Drag-drop the selected fields onto the design area. A table with its column bound to the fields is created and the cells in the table have a textbox.
You can double-click in the table cell and the textbox will become editable and you can edit the font, size, color, etc. of the text.
Apply Parameters
Properties Tab
You can customize the default textbox appearance by setting properties in the Properties tab of the TextBox control. Properties like adding a border, editing font size, font type, background color, etc. can be customized.
Listed below are the common properties.
Property Section | Property Description |
---|---|
Common |
|
Action |
|
Background | This sets the background of the textbox.
|
Border | This option sets the border of the textbox.
|
Text | This sets the text formatting in the textbox. You can set the font Color, Family, Size, Style, Weight, Decoration, Alignment, Justification, Vertical Align, word WrapMode, Line Spacing, Character Spacing, Data Format, Rotation Angle, Font adaptation, and font-weight ratio. |
Dimensions | This sets the location and size of the textbox.
|
Layout | This sets the textbox layout in a report as a whole. Style: This option sets the theme of the textbox in the report. Padding: Padding refers to the space between the textbox content and the border. You can set the padding from - Top: Sets the top padding in points, Left: Sets the left padding in points, Right: Sets the right padding in points, Bottom: Sets the bottom padding in points. Layer Name: Sets the report layer. Keep Together: This option ensures whether the textbox will appear on the same page or not when there is a lot of content. Can Grow: Determines whether the report should increase the height of the textbox control based on its content. Can Shrink: Determines whether the text box height should automatically shrink when there is less content. Z-Index: This property sets the position of the textbox when there are multiple textboxes that are stacked together. The textbox with a greater Z-Index value will always be in front of the textbox that has a lower Z-Index value. |
Visibility | This sets the visibility of the textbox control on the report preview. Hidden: This option sets whether to hide the textbox or not on the preview. Toggle Item: Visibility can be toggled by another report item. This option sets another item, such as another text box, as a toggle button to whether display the current text box or not. Initial Toggle State: This option sets the display state of the textbox (that can be used as a toggle button) when the report is first loaded. If it is Collapsed, then the toggle element shows as a plus sign, and all the content of the current textbox is hidden. If it is Expanded, then the toggle element shows as a minus sign, and all the content of the current textbox is displayed. |
Data | Element Name: You can enter a name to be used in the XML output for this textbox. Element Output: You can select Auto, Output, or NoOutput to decide whether to include this textbox in the XML output or not. Auto exports the contents of the textbox only when the value is not a constant. Element Style: You can select Auto, AttributeNormal, or ElementNormal to decide whether to render textboxes as Attributes or Elements in the exported XML file. Auto uses the report's setting for this property. |
User Sort | Sort Expression: You can enter an expression to sort the data. Sort Target: You need to select the data region within the report on which to apply the sorting. The default value is the current scope, but you can also choose an alternate data region. |
International | This section is used to set the calendar fields to the international formats. You can select the international Calendar styles, writing direction (rtl or ltr), language, writing mode, etc. |
Misc Options | Tooltip: Sets the textual label of the textbox when the mouse is moved over the cell. Label: Sets a textual content that is used as the display text for report catalog items. The report catalog is made using the Table of Contents element in the toolbox, and the table of contents is used for quick positioning jumps in multi-page reports. Bookmark: Enter text or an expression to use as a positioning identifier to jump to this element. You can define the bookmark and then select the "jump to bookmark" setting, to make it easier to jump between report content. You can bookmark any element in the report to make it a destination anchor for the jump. Heading Level: Sets the heading levels in the TOC |