-
Notifications
You must be signed in to change notification settings - Fork 0
/
Form1.vb
28 lines (27 loc) · 1.27 KB
/
Form1.vb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Imports System.Windows.Forms
Imports DevExpress.XtraPivotGrid
Namespace WinPivot_CustomFunctions
Partial Public Class Form1
Inherits Form
Public Sub New()
InitializeComponent()
' This line of code is generated by Data Source Configuration Wizard
salesPersonTableAdapter1.Fill(nwindDataSet1.SalesPerson)
pivotGridControl1.BestFit()
pivotGridControl1.OptionsView.ShowColumnTotals = False
pivotGridControl1.OptionsView.ShowRowTotals = False
pivotGridControl1.OptionsView.ShowRowGrandTotals = False
pivotGridControl1.OptionsData.DataProcessingEngine = PivotDataProcessingEngine.Optimized
Dim pivotGridField1 As New PivotGridField() With {
.Area = PivotArea.DataArea,
.AreaIndex = 0,
.Caption = "First Product Sold",
.FieldName = "FirstProductSold"
}
pivotGridControl1.Fields.Add(pivotGridField1)
pivotGridField1.DataBinding = New ExpressionDataBinding() With {.Expression = "FirstValue([ProductName])"}
pivotGridField1.Options.ShowExpressionEditorMenu = True
pivotGridField1.Options.ShowGrandTotal = False
End Sub
End Class
End Namespace