예제 #1
0
 public static void SetupVariables(OnDemandProcessingContext odpContext, List <Variable> variableDefs, object[] variableValues)
 {
     if (variableDefs != null)
     {
         for (int i = 0; i < variableValues.Length; i++)
         {
             Variable     variable          = variableDefs[i];
             VariableImpl cachedVariableObj = variable.GetCachedVariableObj(odpContext);
             cachedVariableObj.SetValue(variableValues[i], true);
         }
     }
 }
 public void SetUpdatedVariableValues(OnDemandProcessingContext odpContext, AspNetCore.ReportingServices.ReportIntermediateFormat.ReportInstance reportInstance)
 {
     if (this.m_updatedVariableValues != null)
     {
         string key = odpContext.SubReportUniqueName ?? "Report";
         UpdatedVariableValues updatedVariableValues = default(UpdatedVariableValues);
         if (this.m_updatedVariableValues.TryGetValue(key, out updatedVariableValues))
         {
             Dictionary <int, object> variableValues = updatedVariableValues.VariableValues;
             List <AspNetCore.ReportingServices.ReportIntermediateFormat.Variable> variables = odpContext.ReportDefinition.Variables;
             foreach (KeyValuePair <int, object> item in variableValues)
             {
                 reportInstance.VariableValues[item.Key] = item.Value;
                 AspNetCore.ReportingServices.ReportIntermediateFormat.Variable variable = variables[item.Key];
                 VariableImpl cachedVariableObj = variable.GetCachedVariableObj(odpContext);
                 cachedVariableObj.SetValue(item.Value, true);
             }
         }
     }
 }