cancel
Showing results for 
Search instead for 
Did you mean: 

Has anyone any examples of using Cubeview extender rules to change the logo displayed in a report based on the entity selected

OSAdmin
Community Manager
Community Manager
Originally posted by Matt Grundey

11/6/2017

Hi, has anyone any examples of using Cubeview extender rules to change the logo displayed in a report based on the entity selected. I'm aware that this wouldn't work where entities are shown in rows or columns. I can't see any examples of passing in parameters into these rules that could identify the entity, nor can I see from the reference doc how I can get the entity that the report is using. 

2 REPLIES 2

OSAdmin
Community Manager
Community Manager
Originally posted by Steve Mebius

I got a basic example working which used workflow assigned entities and read a text property on the first entity in order to pass the logo name into the filepath. I tested further and managed to get an example working which read the Cubeview POV entity and passed this into the logo filepath. I then saved a different logo for each entity. It seems to work, atleast well enough for me to tell the partner it should be feasible, without creating numerous versions of the same report. Here is the sample of that last example:
Case Is = CVExtenderFunctionType.FormatReportUIItem
Dim uiItem As CVExtenderReportUIItem = args.Report.CurrentUIItem

If uiItem.UIItemType = XFReportUIItemType.PageHeaderPictureBoxLogo Then
'-------------------------------
Dim objKeyedByDimTypeInt As KeyedByDimTypeList(Of CubeViewPOVMember) = args.CubeView.CubeViewPovMembers
Dim TextValue As String = objKeyedByDimTypeInt.Entity.Name
'----------------------------

uiItem.SetPictureBoxImage(FileSystemLocation.ApplicationDatabase,""Documents/Public/DashboardImages/"" & TextValue & "".png"",TriStateBool.TrueValue)
End If

OSAdmin
Community Manager
Community Manager
Originally posted by Bart DeHaas

Here is how I have done it. It actual put a different logo depending on the company.

Case Is = CVExtenderFunctionType.FormatReportUIItem
Dim uiItem As CVExtenderReportUIItem = args.Report.CurrentUIItem
uiitem.FontFamily = "Calibri"
uiitem.FontSize = 11

If uiItem.UIItemType = XFReportUIItemType.PageHeaderPictureBoxLogo Then


If args.CubeView.CubeViewPovMembers.Entity.Name.Contains("SV") Then


uiItem.SetPictureBoxImage(FileSystemLocation.ApplicationDatabase,"Documents/Public/tb_special vehicles_rgb.png", TriStateBool.TrueValue)
uiItem.Height = 30
uiItem.width = 150

Please sign in! OSAdmin