コード例 #1
0
        internal Parameter Add(ActionDrillthrough owner, Microsoft.ReportingServices.ReportIntermediateFormat.ParameterValue paramDef)
        {
            Parameter parameter = new Parameter(owner, paramDef);

            m_list.Add(parameter);
            return(parameter);
        }
コード例 #2
0
 internal Parameter(ActionDrillthrough actionDef, Microsoft.ReportingServices.ReportIntermediateFormat.ParameterValue parameterDef)
 {
     m_name         = parameterDef.Name;
     m_actionDef    = actionDef;
     m_parameterDef = parameterDef;
     m_instance     = new ParameterInstance(this);
 }
コード例 #3
0
 public Parameter CreateParameter(string name)
 {
     if (!m_owner.IsChartConstruction)
     {
         if (m_owner.IsDynamic && m_owner.ReportElementOwner.CriGenerationPhase != ReportElement.CriGenerationPhases.Instance)
         {
             throw new RenderingObjectModelException(RPRes.rsErrorDuringROMWritebackDynamicAction);
         }
         if (!m_owner.IsDynamic && m_owner.ReportElementOwner.CriGenerationPhase != ReportElement.CriGenerationPhases.Definition)
         {
             throw new RenderingObjectModelException(RPRes.rsErrorDuringROMWritebackNonDynamicAction);
         }
     }
     if (Parameters == null)
     {
         m_actionItemDef.DrillthroughParameters = new List <Microsoft.ReportingServices.ReportIntermediateFormat.ParameterValue>();
         Global.Tracer.Assert(Parameters != null, "(Parameters != null)");
     }
     Microsoft.ReportingServices.ReportIntermediateFormat.ParameterValue parameterValue = new Microsoft.ReportingServices.ReportIntermediateFormat.ParameterValue();
     parameterValue.Name = name;
     m_actionItemDef.DrillthroughParameters.Add(parameterValue);
     if (!m_owner.IsChartConstruction && m_owner.ReportElementOwner.CriGenerationPhase == ReportElement.CriGenerationPhases.Instance)
     {
         parameterValue.Value = Microsoft.ReportingServices.ReportIntermediateFormat.ExpressionInfo.CreateEmptyExpression();
     }
     return(Parameters.Add(this, parameterValue));
 }
コード例 #4
0
        private NameValueCollection ConvertToNameValueCollection(bool forDrillthroughEvent, out bool[] sharedParams)
        {
            int count = m_list.Count;
            NameValueCollection nameValueCollection = new NameValueCollection(count);

            sharedParams = new bool[count];
            for (int i = 0; i < count; i++)
            {
                Parameter         parameter = m_list[i];
                ParameterInstance instance  = parameter.Instance;
                Microsoft.ReportingServices.ReportIntermediateFormat.ParameterValue parameterDef = parameter.ParameterDef;
                object obj = null;
                if (parameterDef.Value != null && parameterDef.Value.Type == Microsoft.ReportingServices.ReportIntermediateFormat.ExpressionInfo.Types.Token)
                {
                    sharedParams[i] = true;
                }
                else
                {
                    sharedParams[i] = false;
                }
                if (instance.Omit)
                {
                    continue;
                }
                obj = instance.Value;
                if (obj == null)
                {
                    nameValueCollection.Add(parameter.Name, null);
                    continue;
                }
                object[] array = obj as object[];
                if (array != null)
                {
                    for (int j = 0; j < array.Length; j++)
                    {
                        nameValueCollection.Add(parameter.Name, ConvertValueToString(array[j], forDrillthroughEvent));
                    }
                }
                else
                {
                    nameValueCollection.Add(parameter.Name, ConvertValueToString(obj, forDrillthroughEvent));
                }
            }
            return(nameValueCollection);
        }
コード例 #5
0
 internal ParameterInfo(Microsoft.ReportingServices.ReportIntermediateFormat.ParameterValue source)
     : base(source)
 {
     m_isUserSupplied = true;
 }
コード例 #6
0
 internal bool EvaluateDrillthroughParamOmit(IReportScopeInstance romInstance, OnDemandProcessingContext context, IInstancePath ownerItem, ParameterValue paramValue, Microsoft.ReportingServices.ReportProcessing.ObjectType objectType, string objectName)
 {
     context.SetupContext(ownerItem, romInstance);
     return(context.ReportRuntime.EvaluateParamValueOmitExpression(paramValue, objectType, objectName));
 }
コード例 #7
0
 internal object EvaluateDrillthroughParamValue(IReportScopeInstance romInstance, OnDemandProcessingContext context, IInstancePath ownerItem, List <string> fieldsUsedInOwnerValue, ParameterValue paramValue, Microsoft.ReportingServices.ReportProcessing.ObjectType objectType, string objectName)
 {
     context.SetupContext(ownerItem, romInstance);
     Microsoft.ReportingServices.RdlExpressions.ReportRuntime reportRuntime = context.ReportRuntime;
     reportRuntime.FieldsUsedInCurrentActionOwnerValue = fieldsUsedInOwnerValue;
     Microsoft.ReportingServices.RdlExpressions.ParameterValueResult parameterValueResult = reportRuntime.EvaluateParameterValueExpression(paramValue, objectType, objectName, "DrillthroughParameterValue");
     reportRuntime.FieldsUsedInCurrentActionOwnerValue = null;
     return(parameterValueResult.Value);
 }
コード例 #8
0
 internal ParameterBase(Microsoft.ReportingServices.ReportIntermediateFormat.ParameterValue source)
 {
     m_dataType    = DataType.Object;
     m_name        = source.Name;
     m_usedInQuery = false;
 }