Alternatives for conditional expansion - are there any?
I have a reporting requirement.
Projects rollup into customers in UD1. UD6 contains employees.
Reporting requirement is to display both customers and projects U1#Total_Customers.DescendantsInclusive. Also display employee U6#Total_Employees & U6#Total_Employees.Descendants . This issue is when the report renders they only want to see Total_Employees (UD6) at the customer level and Total_Employees.DescendantsInclusive at the project level.
example:
--UD1-- --UD6----------- Amt
Cust1 Total Employees 250
Proj1 Total Employees 100
Dave 50
Scott 50
Proj2 Total Employee 150
Mike 75
Tom 75
I know expansion is set at the CV level and its not flexible, so that is not an option.
I tried an XFBR rule with the idea to evaluate the UD1 member. If it has children then return "Total_Employees" for the UD6 member, else return "Total Employees.DescendantsInclusive".
The issue with the XFBR is I can't use |MFUD1| to pass the current UD1 member. Somehow I need to have it evaluate the current member selected for UD1 and I am stumped as to how. Seems like I need a loop.
If args.FunctionName.XFEqualsIgnoreCase("GetTotalEmployee") Then
BRApi.ErrorLog.LogMessage(si, "Entering check for Total Employee")
Dim ProjectNumber As String = args.NameValuePairs("ProjectNumber")
BRApi.ErrorLog.LogMessage(si, "ProjectNumber =" & ProjectNumber)
Dim ProjectMemberID As Integer = BRApi.Finance.Members.GetMemberId(si, dimType.UD1.Id, ProjectNumber)
BRApi.ErrorLog.LogMessage(si, "ProjectMemberID =" & ProjectMemberID)
Dim objDimPk As DimPk = BRApi.Finance.Dim.GetDimPk(si,"Project")
Dim Parent As Boolean = BRApi.Finance.Members.HasChildren(si,objDimPk,ProjectMemberID)
BRApi.ErrorLog.LogMessage(si, "Parent =" & Parent)
If Parent=True Then
'Desc: If current project (UD1) has children then return Total_Employees (UD6)
Return "Total_Employees"
Else
'Desc:Else return IDescendants of Total_Employees
Return"Total_Employees.TreeDescendantsInclusive"
End If
End If
Any suggestions on how address the XFBR rule or other approaches?
Thank you