Design RDL report using textbox
This section describes the steps to design RDL report using textbox.
Add textbox to the report
You can add textbox report item in header, footer and body area of the report.
- Refer Add a textbox to the report section and add a textbox in the report header, body and footer section.
- In the below snap, the textbox is added in report header to display a title text, report body to display static fields, and in report footer to display a label for signature field in the report.
Display dynamic text using expression
You can display dynamic values in the textbox using parameters and dataset fields. To achieve this requirement expressions are used. In the below steps, the report parameter is assigned in the textbox to display the dynamic value.
- Refer Create Parameter section and create a new report parameter
- Refer Add a textbox to the report section and add a textbox in the report.
- Focus in the textbox and right click in the text area. The textbox context menu will appear as shown below.
- Select the
Expression
option in the menu list. Now, expression editor opens as shown below.
- You can choose/specify the required expression in the text area. Here, a
InvoiceID
parameter appended with #
symbol is assigned as expression.
To learn more about handling expressions in report designer refer Expressions section.
- The specified expression is displayed in the text area at respective cursor position as shown below.
Note: If the expression’s character length exceeds 18, it will be displayed in a shortened format.
- Now, when you hover over expression tag, the actual expression is displayed in a tooltip.
Edit the expression
- To edit the created expression in the textbox, select the specific expression.
- Right click on the respective tag to open the context menu.
- Select the
Expression
option in the menu list. Now, expression editor opens as shown below.
- Now, modify the expression as required and click on the
OK
button.
Associate a textbox with dataset
Refer Create Data section to create dataset in Web Report Designer.
Drag and drop dataset field
- Open the
DATA
panel and expand the required dataset fields
- Drag and drop the required dataset field into the design area,
- Now, the new textbox will be added in the design area like below,
Assign the field using expression editor
You can also associate the dataset field in textbox using the expression editor. Refer Dataset Fields in Expression section.
Associate a textbox with parameter
Refer Create Parameter section to create report parameter in Web Report Designer.
Drag and drop parameter field
- Open the
PARAMETERS
panel, the available parameters in the report will be listed in the panel.
- Drag and drop the required parameter into the design area,
- Now, the new textbox will be added in the design area like below,
Assign the parameter using expression editor
You can also associate parameter in textbox using the expression editor. Refer Dataset Fields in Expression section.
Configure and Format textbox content
You can configure the textbox in below ways:
- Focus the overall textbox element to configure properties for whole textbox content.
- Select the specific text to configure properties for selected text.
Position and Sizing
To improve the report readability and design, you can set position and sizing properties for the textbox.
Report design view after sizing the textboxes,
Style textbox content
Over all textbox
Select the textbox and open the properties panel. Under the Basic Settings
and Appearance
category set the font and alignment properties for the textbox.
Selected text
Select specific text in the textbox and open the properties panel. Now, the Selected Text
properties will be displayed in the properties panel.
Under the Basic Settings
and Paragraph Settings
category set the font and alignment properties for the selected text.
Format value in textbox
You can apply format for overall textbox value or to a selected text in a textbox.
Format overall textbox
- Select a textbox in the design area. In the below image, the textbox contains
UnitPrice
dataset field is selected.
- In the properties pane, to set the format click on the below highlighted button under the
Basic Settings
category.
- Now, the format dialog will open. Refer Format Data section to set different formats to the data. Here, the
Currency
format is applied to the Unit Price
dataset field.
- Once you set format, the format will be shown in the properties panel like below,
- On report preview, the
Unit Price
field value will be displayed like below.
Format selected text
- Select a specific text in the textbox.
- In the properties pane, to set the format click on the below highlighted button under the
Basic Settings
category.
- Now, the format dialog will open. Refer Format Data section to set different formats to the data. Here, the
Currency
format is applied to the Unit Price
dataset field.
- Once you set format, the format will be shown in the properties panel like below,
- On report preview, the
Unit Price
field value will be displayed like below.
Report linking
You can link a report in the textbox, when you click on a specific text it will display the respective report in the report viewer.
Over all textbox
- Select a textbox in the design area.
- In the properties view, enable the
Enable Link
option under Link
category.
- Refer Report Linking section and set the report path in the textbox.
- On report preview, when you click anywhere within the specific textbox will display the
SalesOrderDetail
report in the report viewer.
- Once you click on the textbox, the target report will be displayed like below.
Selected text
- Select a specific text in the textbox.
- In the properties view, enable the
Enable Link
option under Link
category.
- Refer Report Linking section and set the report path in the textbox.
- On report preview, when you click on the
here
text in the respective textbox will display the SalesOrderDetail
report in the report viewer.
- Once you click on the textbox, the target report will be displayed like below.
Add hyperlink
You can define the events to take place when users click on the text box or certain area displayed on a report.
Over all textbox
- Select a textbox in the design area.
- In the properties view, enable the
Enable Link
option under Link
category.
- Refer Hyperlink section and set the URL in the textbox.
- On report preview, when you click anywhere within the specific textbox will display the
SalesOrderDetail
report in the report viewer on the new tab in browser.
Selected text
- Select a specific text in the textbox.
- In the properties view, enable the
Enable Link
option under Link
category.
- Refer Hyperlink section and set the URL in the textbox.
- On report preview, when you click on the
here
text in the respective textbox will display the SalesOrderDetail
report in the report viewer on the new tab in browser.