Appframe Knowledge Base


1 hits
1

Summary of percent field in pivots

        If e.DataField Is fieldExternalShare Then
            Dim vDS As PivotDrillDownDataSource = e.CreateDrillDownDataSource
            For i = 0 To vDS.RowCount - 1
                vTotal = vTotal + CDec(vDS.GetValue(i, fieldTotal)) 
                vExternal = vExternal + CDec(vDS.GetValue(i, fieldExternalManhours))
            Next
            If vTotal > 0 Then
                e.CustomValue = vExternal / vTotal
            Else
                e.CustomValue = Nothing
            End If
        End If

win · Perma link post comment Posted by: Johnny Vik (27-nov-2013)