Creating a Pivot
Pivots are based on reports. Creating a pivot begins with a report containing all the fields and retrieval criteria. To learn more about reports, refer to the "Reporting" section in this user guide.
|
To display the Pivot button on the report, define a pivot element after the retrieval criteria, as shown below, with the pivot name. This will display as the name of the tab the pivot will be opened with in the UI. A pivot table can be accessed from a report or can have a direct reference to it from UI.
...
</
Retrieval
>
<
Pivot
>
<
PivotName
>BooksStoreCharts</
PivotName
>
</
Pivot
>
</
Report
- To reference a pivot from a report, refer to the section titled "Report from UI." The following image shows the View Pivot button on a report.
- Click the View Pivot button.
The pivot screen for that report displays. Users can make adjustments to the data and chart type. - Click the developer's code popup button as highlighted in the screenshot above.
A popup with the code for the pivot widget displays. - Click the Copy to Clipboard button to copy the code.
- Click the Download button to download the code to your computer.
To display a web action reference to a pivot, configure the UI metamodel as follows:
<?
xml
version
=
"1.0"
encoding
=
"UTF-8"
?>
<
UiMetaModel
xmlns
=
"http://www.onenetwork.com/Platform"
xmlns:xsi
=
"http://www.w3.org/2001/XMLSchema-instance"
>
<
ValueChainId
>9123</
ValueChainId
>
<
Name
>UI Meta Model</
Name
>
<
Version
>1.0</
Version
>
<
WebInfo
>
<
WebAction
iconCls
=
"sho-icon-report"
name
=
"ReportFrameworkDemonstration"
>
<
PanelOptions
>
<
PanelClass
>One.Report</
PanelClass
>
<
PanelConfig
>{reportName: "ZBKS.MyFirstReport", autoExecute: true}</
PanelConfig
>
</
PanelOptions
>
</
WebAction
>
<
WebAction
iconCls
=
"sho-icon-report"
name
=
"PivotDemonstration"
>
<
PanelOptions
>
<
PanelClass
>One.Pivot</
PanelClass
>
<
PanelConfig
>{reportName: "ZBKS.MyFirstReport", autoExecute: true}</
PanelConfig
>
</
PanelOptions
>
</
WebAction
>
<
RoleTypeUiConfig
menuType
=
"menu"
titleKey
=
"bookstore.title"
>
<
RoleTypeRef
>
<
IntrinsicRoleType
>ZBKS.SampleRoleType</
IntrinsicRoleType
>
</
RoleTypeRef
>
<
Home
name
=
"ReportFrameworkDemonstration"
/>
<
QuickLaunch
name
=
"ReportFrameworkDemonstration"
iconCls
=
"temp-icon-1"
/>
<
QuickLaunch
name
=
"PivotDemonstration"
iconCls
=
"temp-icon-3"
/>
</
RoleTypeUiConfig
>
</
WebInfo
>
</
UiMetaModel
>
- Click the X to close the popup.
- Click the Favorites icon to save the pivot screen to the list of favorites saved in the Menu/Favs navigation.