Forum Discussion
JackLacava
3 years agoCommunity Manager
You might have to figure out exactly what columns you need so that the chart actually works, but this is a generic Dashboard DataSet rule that queries a table in the application database.
Namespace OneStream.BusinessRule.DashboardDataSet._JL
Public Class MainClass
Public Function Main(ByVal si As SessionInfo, ByVal globals As BRGlobals, ByVal api As Object, ByVal args As DashboardDataSetArgs) As Object
Try
Select Case args.FunctionType
Case Is = DashboardDataSetFunctionType.GetDataSetNames
Dim names As New List(Of String)()
names.Add("Dims")
Return names
Case Is = DashboardDataSetFunctionType.GetDataSet
If args.DataSetName.XFEqualsIgnoreCase("Dims") Then
Dim sql As String = "SELECT * FROM Dim"
Using dbConn As DbConnInfo = BRApi.Database.CreateApplicationDbConnInfo(si)
Dim result As DataTable = BRApi.Database.ExecuteSql(dbConn, sql, False)
Return result
End Using
End If
End Select
Return Nothing
Catch ex As Exception
Throw ErrorHandler.LogWrite(si, New XFException(si, ex))
End Try
End Function
End Class
End Namespace
Sergey
3 years agoContributor III
Thanks guys !
The thing is, I don't know what should be expected format for the graph and I can't find any documentatio about it. So far, these business rule will allow me to have a table with what's coming from my SQL query, but I don't know what the Graphs Data Adapter is expecting in terms of columns... any ideas ?
Regards,
Related Content
- 2 years ago
- 2 years ago
- 4 years ago