Exemplo n.º 1
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);
 }
Exemplo n.º 2
0
 internal Parameter(ActionDrillthrough actionDef, Microsoft.ReportingServices.ReportProcessing.ParameterValue parameterDef, ActionItemInstance actionInstance, int index)
 {
     m_name      = parameterDef.Name;
     m_value     = new ReportVariantProperty(parameterDef.Value);
     m_omit      = new ReportBoolProperty(parameterDef.Omit);
     m_actionDef = actionDef;
     m_instance  = new ParameterInstance(actionInstance, index);
 }
        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);
        }
Exemplo n.º 4
0
        internal void ConstructParameterDefinition()
        {
            ParameterInstance instance = Instance;

            Global.Tracer.Assert(instance != null);
            if (instance.Value != null)
            {
                m_parameterDef.Value = Microsoft.ReportingServices.ReportIntermediateFormat.ExpressionInfo.CreateConstExpression((string)instance.Value);
            }
            else
            {
                m_parameterDef.Value = Microsoft.ReportingServices.ReportIntermediateFormat.ExpressionInfo.CreateEmptyExpression();
            }
            m_value = null;
            if (instance.IsOmitAssined)
            {
                m_parameterDef.Omit = Microsoft.ReportingServices.ReportIntermediateFormat.ExpressionInfo.CreateConstExpression(instance.Omit);
            }
            else
            {
                m_parameterDef.Omit = Microsoft.ReportingServices.ReportIntermediateFormat.ExpressionInfo.CreateEmptyExpression();
            }
            m_omit = null;
        }
Exemplo n.º 5
0
        void IPersistable.Serialize(IntermediateFormatWriter writer)
        {
            writer.RegisterDeclaration(m_Declaration);
            while (writer.NextMember())
            {
                switch (writer.CurrentMember.MemberName)
                {
                case MemberName.Label:
                {
                    string value2 = null;
                    if (m_actionDef.Label.IsExpression)
                    {
                        value2 = m_label;
                    }
                    writer.Write(value2);
                    break;
                }

                case MemberName.BookmarkLink:
                {
                    string value = null;
                    if (m_actionDef.BookmarkLink != null && m_actionDef.BookmarkLink.IsExpression)
                    {
                        value = m_bookmark;
                    }
                    writer.Write(value);
                    break;
                }

                case MemberName.HyperLinkURL:
                {
                    string value3 = null;
                    if (m_actionDef.Hyperlink != null && m_actionDef.Hyperlink.IsExpression)
                    {
                        value3 = m_hyperlinkText;
                    }
                    writer.Write(value3);
                    break;
                }

                case MemberName.DrillthroughReportName:
                {
                    string value4 = null;
                    if (m_actionDef.Drillthrough != null && m_actionDef.Drillthrough.ReportName.IsExpression)
                    {
                        value4 = m_actionDef.Drillthrough.Instance.ReportName;
                    }
                    writer.Write(value4);
                    break;
                }

                case MemberName.DrillthroughParameters:
                {
                    ParameterInstance[] array = null;
                    if (m_actionDef.Drillthrough != null && m_actionDef.Drillthrough.Parameters != null)
                    {
                        array = new ParameterInstance[m_actionDef.Drillthrough.Parameters.Count];
                        for (int i = 0; i < array.Length; i++)
                        {
                            array[i] = m_actionDef.Drillthrough.Parameters[i].Instance;
                        }
                    }
                    writer.Write(array);
                    break;
                }

                default:
                    Global.Tracer.Assert(condition: false);
                    break;
                }
            }
        }