Exemplo n.º 1
0
        // initializes or restores pivot view
        void OnSetData()
        {
            // fill lookups
            FillLookup("Country", Properties.Resources.SqlLookupCountry);
            FillLookup("Company", Properties.Resources.SqlLookupCustomer);
            FillLookup("Employee", Properties.Resources.SqlLookupEmployee);
            // set default C1FlexPivot view
            _c1FlexPivotPage.FlexPivotEngine.ShowTotalsRows = ShowTotals.Subtotals;
            C1FlexPivotField field = GetField("OrderID");

            if (field != null)
            {
                field.Subtotal = Subtotal.Count;
                _c1FlexPivotPage.FlexPivotEngine.ValueFields.Add(field);
            }
            field = GetField("Country");
            if (field != null)
            {
                _c1FlexPivotPage.FlexPivotEngine.RowFields.Add(field);
            }
            field = GetField("Company");
            if (field != null)
            {
                _c1FlexPivotPage.FlexPivotEngine.RowFields.Add(field);
            }
        }
Exemplo n.º 2
0
        // fill lookup dictionary for the field from the database
        void FillLookup(string fieldName, string lookupSql)
        {
            C1FlexPivotField field = _c1FlexPivotPage.FlexPivotPanel.FlexPivotEngine.Fields[fieldName];

            if (field.Lookup == null)
            {
                field.Lookup = GetLookup(conn, lookupSql);
            }
        }
Exemplo n.º 3
0
        // fills lookup dictionary for the field from the database
        void FillLookup(string fieldName, string lookupSql)
        {
            C1FlexPivotField field = GetField(fieldName);

            if (field != null && field.Lookup == null)
            {
                field.Lookup = GetLookup(conn, lookupSql);
            }
        }
Exemplo n.º 4
0
        // set field lookup
        void FillLookup(string fieldName, string lookupName)
        {
            C1FlexPivotField field = c1FlexPivotPage1.FlexPivotPanel.FlexPivotEngine.Fields[fieldName];

            if (field.Lookup == null)
            {
                field.Lookup = GetLookup(lookupName);
            }
        }