Dynamic Dashboards Service Type
Dynamic dashboards enable you to modify components within the dashboard as well as modifying the dashboard itself.
Create the service factory assembly file and then the Dynamic Dashboards service. Then, uncomment the appropriate lines of code. The following example is the service factory assembly file in C# with the lines for the Dynamic Dashboards service uncommented.
NOTE: The file name must match the name of the returned function in the service factory file.
Configure the Dynamic Dashboards service with the following options:
-
In the File Name field, enter a name for the file (for example, WsasDynamicDashboards).
-
In the Source Code Type drop-down menu, select Dynamic Dashboards Service.
-
In the Compiler Action drop-down menu, select (Use Default).
NOTE: For the Compiler Action options, Disable ignores the file when the assembly is compiled. (Use Default) is the same as Compile.
The following example features embedded components that have not been created manually in the Workspaces interface but are generated by the assembly file.
IMPORTANT: Before writing the assembly, ensure the Dashboard Type property is set to Embedded Dynamic. Otherwise, the rule will not run. This is also where you should ensure the Workspace Assembly Service property is set to the service factory assembly file.
There is no special syntax required for referencing this service type.
Existing Dynamic Dashboard service types using VB.NET that were created before Platform Version 9.0.0 require the GetDynamicCubeViewForDynamicComponent function in the source code. If this function is not added to the service type, you will receive the following error.
To update and compile these service files, complete the following steps:
-
Copy the following lines of code to add the
GetDynamicCubeViewForDynamicComponentmethod.CopyGetDynamicCubeViewForDynamicComponent VB.Net Code
Public Function GetDynamicCubeViewForDynamicComponent(ByVal si As SessionInfo, ByVal api As IWsasDynamicDashboardsApiV800, ByVal workspace As DashboardWorkspace, _
ByVal maintUnit As DashboardMaintUnit, ByVal dynamicComponentEx As WsDynamicComponentEx, ByVal storedCubeViewItem As CubeViewItem, _
ByVal customSubstVarsAlreadyResolved As Dictionary(Of String, String)) As WsDynamicCubeViewEx Implements IWsasDynamicDashboardsV800.GetDynamicCubeViewForDynamicComponent
Try
If api IsNot Nothing Then
Return api.GetDynamicCubeViewForDynamicComponent(si, workspace, dynamicComponentEx, storedCubeViewItem, String.Empty, Nothing, TriStateBool.Unknown, WsDynamicItemStateType.Unknown)
End If
Return Nothing
Catch ex As Exception
Throw New XFException(si, ex)
End Try
End Function -
Paste the code in the Dynamic Dashboard service file that is producing the error. You can paste the full function after the
GetDynamicParametersForDynamicComponentmethod. This is after line 93 in the original source code.
-
Select Compile Assembly to compile the assembly file.
IMPORTANT: You can use new functionalities within Platform Version 8.2.0 and later for service types in C#. While new coding options will work in C#, these new functionalities in Platform Version 8.2.0 and later may not be compatible with VB.Net.