Пример #1
0
 public void addColumnRole(string roleName, string roleCode, SASVariableSelector.ROLETYPE columnTypes, int minCols, int maxCols, bool unique)
 {
     roleMappings.Add(roleName, roleCode);
     SASVariableSelector.AddRoleParams roleParms = new SASVariableSelector.AddRoleParams();
     roleParms.Name       = roleName;
     roleParms.Type       = columnTypes;
     roleParms.MinNumVars = minCols;
     if (maxCols > 0)
     {
         roleParms.MaxNumVars = maxCols;
     }
     roleParms.Unique = unique;
     sasVarSelector.AddRole(roleParms);
 }
Пример #2
0
        private void SetupVariableRoles()
        {
            // define the two roles that we're going to use for this task

            // this one is the "Measure" role, which requires a numeric variable
            SASVariableSelector.AddRoleParams parms = new SASVariableSelector.AddRoleParams();
            parms.Name       = Translate.MeasureValueRole;
            parms.MinNumVars = 1; // Min of 1 says required
            parms.MaxNumVars = 1; // one and only one
            // not going to allow "macro"-style prompts
            parms.AcceptsMacroVars = false;
            parms.Type             = SASVariableSelector.ROLETYPE.Numeric;
            varSelCtl.AddRole(parms);

            // and this one is the "grouping" role, optional
            SASVariableSelector.AddRoleParams labelParm = new SASVariableSelector.AddRoleParams();
            labelParm.Name       = Translate.GroupingRole;
            labelParm.MinNumVars = 0; // optional
            // No labelParm.MaxNumVars to allow as many as you want
            // not going to allow "macro"-style prompts
            labelParm.AcceptsMacroVars = false;
            labelParm.Type             = SASVariableSelector.ROLETYPE.All;
            varSelCtl.AddRole(labelParm);
        }
        private void SetupVariableRoles()
        {
            // define the two roles that we're going to use for this task

            // this one is the "Measure" role, which requires a numeric variable
            SASVariableSelector.AddRoleParams parms = new SASVariableSelector.AddRoleParams();
            parms.Name = Translate.MeasureValueRole;
            parms.MinNumVars = 1; // Min of 1 says required
            parms.MaxNumVars = 1; // one and only one
            // not going to allow "macro"-style prompts
            parms.AcceptsMacroVars = false;
            parms.Type = SASVariableSelector.ROLETYPE.Numeric;
            varSelCtl.AddRole(parms);

            // and this one is the "grouping" role, optional
            SASVariableSelector.AddRoleParams labelParm = new SASVariableSelector.AddRoleParams();
            labelParm.Name = Translate.GroupingRole;
            labelParm.MinNumVars = 0; // optional
            // No labelParm.MaxNumVars to allow as many as you want
            // not going to allow "macro"-style prompts
            labelParm.AcceptsMacroVars = false;
            labelParm.Type = SASVariableSelector.ROLETYPE.All;
            varSelCtl.AddRole(labelParm);
        }