Creating a template for widgets
- In the report catalog, right-click the Report Templates folder and select New > Report Template.
-
In the Properties pane assign your style sheet to the
template.
This step is not necessary if you chose the style sheet in the Create Report dialog box.
-
Right-click the template in the report catalog and select
Style Sheet > Copy Styles.
This step is not necessary if you chose the style sheet in the Create Report dialog box.
-
Create these report variables:
- ShowTitle: TRUE
- ShowMargin: TRUE
- ShowToolbar: TRUE
- Title: Title
-
Right-click the template in the report catalog and select Report Actions. Specify a set parameters
action that has these parameters:
Name Property Value ShowMargin Value (.Text) =NOT(GETENVIRONMENTINFO("Container","HasMargin"))
ShowTitle Value (.Text) =NOT(GETENVIRONMENTINFO("Container","HasTitle"))
Title Value (.Text) =TRANSLATEUNIQUESTRING("wdt_Title")
-
Right-click the template in the report catalog and select Report Parameters. Create a report parameter
with these characteristics:
Variable Parameter name Type Fixed Title Title Widget Title Yes This ensures that the widget title is automatically shown in home page widgets.
-
In the Column Properties dialog box, specify these
characteristics:
Column Width (px) Global variable Other A 10 common_Size_ReportMarginSide_Outer B 8 common_Size_ReportMarginSide_Inner C 240 Allow Growth D 8 common_Size_ReportMarginSide_Inner E 10 common_Size_ReportMarginSide_Outer -
In the Row Properties dialog box, specify these
characteristics:
Row Height Variable Other 2 ShowTitle 3 ShowToolbar 4 240 Allow Growth 5 Common_Size_ReportMarginBottom - Click in cell E5 and then click Visible Report Area on the Objects toolbar.
- Select the headers of rows 1, 2, and 3 and click Report Header on the Objects toolbar.
- Drag report variable Title to cell C2.
- Specify Description in C3.
-
Specify, for example, END in cells E2 and E3 and apply
the Neutral style to both cells.
Content in E2 and E3 has the effect of cutting off long strings in C2 and C3, preventing them from overflowing the widget.
-
Insert toolbar icons from shared images into the report. For example, insert
Filter, Edit, and Settings icons. On the Size and
Position tab of the Format Graphic Object
dialog box, specify these options for each icon:
- Independent of cells
- Anchor horizontally to Visible Area
- Anchor vertically to Header
In the Distance to Borders field, select the bottom right option button and specify 5 pixels from the bottom border.
-
In the Distance to Borders field,
specify these distances from the right border for the left, middle, and right
icons respectively:
Left: 73 pixelsMiddle: 44 pixelsRight: 15 pixels
-
In cells A2 and E2, specify this conditional format to apply the Heading 1
style
ReportVariables.ShowMargin.Text="FALSE"
. -
In cells A3 and E3, specify this conditional format to apply the Toolbar
style
ReportVariables.ShowMargin.Text="FALSE"
.