Ejemplo n.º 1
0
 public ReportItem(AspNetCore.ReportingServices.ReportProcessing.CustomReportItem criDef, CustomReportItemInstance criInstance, CustomReportItemInstanceInfo instanceInfo)
 {
     this.m_members = new ReportItemRendering();
     this.Rendering.m_reportItemDef          = criDef;
     this.Rendering.m_reportItemInstance     = criInstance;
     this.Rendering.m_reportItemInstanceInfo = instanceInfo;
     this.m_intUniqueName = criInstance.UniqueName;
 }
Ejemplo n.º 2
0
        public ImageMapAreaInstance Deconstruct(AspNetCore.ReportingServices.ReportProcessing.CustomReportItem context)
        {
            Global.Tracer.Assert(null != context);
            ImageMapAreaInstance imageMapAreaInstance = new ImageMapAreaInstance(context.ProcessingContext);

            imageMapAreaInstance.ID          = this.m_id;
            imageMapAreaInstance.Shape       = this.m_shape;
            imageMapAreaInstance.Coordinates = this.m_coordinates;
            if (this.m_actionInfo != null)
            {
                AspNetCore.ReportingServices.ReportProcessing.Action action = null;
                ActionInstance actionInstance = default(ActionInstance);
                this.m_actionInfo.Deconstruct(imageMapAreaInstance.UniqueName, ref action, out actionInstance, context);
                imageMapAreaInstance.Action         = action;
                imageMapAreaInstance.ActionInstance = actionInstance;
            }
            return(imageMapAreaInstance);
        }
Ejemplo n.º 3
0
        public static ReportItem CreateItem(string uniqueName, AspNetCore.ReportingServices.ReportProcessing.ReportItem reportItemDef, ReportItemInstance reportItemInstance, RenderingContext renderingContext, NonComputedUniqueNames nonComputedUniqueNames)
        {
            if (reportItemDef == null)
            {
                return(null);
            }
            Global.Tracer.Assert(null != renderingContext);
            ReportItem reportItem    = null;
            int        intUniqueName = 0;

            NonComputedUniqueNames[] childrenNonComputedUniqueNames = null;
            if (reportItemInstance != null)
            {
                intUniqueName = reportItemInstance.UniqueName;
            }
            else if (nonComputedUniqueNames != null)
            {
                intUniqueName = nonComputedUniqueNames.UniqueName;
                childrenNonComputedUniqueNames = nonComputedUniqueNames.ChildrenUniqueNames;
            }
            if (reportItemDef is AspNetCore.ReportingServices.ReportProcessing.Line)
            {
                AspNetCore.ReportingServices.ReportProcessing.Line reportItemDef2 = (AspNetCore.ReportingServices.ReportProcessing.Line)reportItemDef;
                LineInstance reportItemInstance2 = (LineInstance)reportItemInstance;
                reportItem = new Line(uniqueName, intUniqueName, reportItemDef2, reportItemInstance2, renderingContext);
            }
            else if (reportItemDef is AspNetCore.ReportingServices.ReportProcessing.CheckBox)
            {
                AspNetCore.ReportingServices.ReportProcessing.CheckBox reportItemDef3 = (AspNetCore.ReportingServices.ReportProcessing.CheckBox)reportItemDef;
                CheckBoxInstance reportItemInstance3 = (CheckBoxInstance)reportItemInstance;
                reportItem = new CheckBox(uniqueName, intUniqueName, reportItemDef3, reportItemInstance3, renderingContext);
            }
            else if (reportItemDef is AspNetCore.ReportingServices.ReportProcessing.Image)
            {
                AspNetCore.ReportingServices.ReportProcessing.Image reportItemDef4 = (AspNetCore.ReportingServices.ReportProcessing.Image)reportItemDef;
                ImageInstance reportItemInstance4 = (ImageInstance)reportItemInstance;
                reportItem = new Image(uniqueName, intUniqueName, reportItemDef4, reportItemInstance4, renderingContext);
            }
            else if (reportItemDef is AspNetCore.ReportingServices.ReportProcessing.TextBox)
            {
                AspNetCore.ReportingServices.ReportProcessing.TextBox reportItemDef5 = (AspNetCore.ReportingServices.ReportProcessing.TextBox)reportItemDef;
                TextBoxInstance reportItemInstance5 = (TextBoxInstance)reportItemInstance;
                reportItem = new TextBox(uniqueName, intUniqueName, reportItemDef5, reportItemInstance5, renderingContext);
            }
            else if (reportItemDef is AspNetCore.ReportingServices.ReportProcessing.Rectangle)
            {
                AspNetCore.ReportingServices.ReportProcessing.Rectangle reportItemDef6 = (AspNetCore.ReportingServices.ReportProcessing.Rectangle)reportItemDef;
                RectangleInstance reportItemInstance6 = (RectangleInstance)reportItemInstance;
                reportItem = new Rectangle(uniqueName, intUniqueName, reportItemDef6, reportItemInstance6, renderingContext, childrenNonComputedUniqueNames);
            }
            else if (reportItemDef is AspNetCore.ReportingServices.ReportProcessing.ActiveXControl)
            {
                AspNetCore.ReportingServices.ReportProcessing.ActiveXControl reportItemDef7 = (AspNetCore.ReportingServices.ReportProcessing.ActiveXControl)reportItemDef;
                ActiveXControlInstance reportItemInstance7 = (ActiveXControlInstance)reportItemInstance;
                reportItem = new ActiveXControl(uniqueName, intUniqueName, reportItemDef7, reportItemInstance7, renderingContext);
            }
            else if (reportItemDef is AspNetCore.ReportingServices.ReportProcessing.SubReport)
            {
                AspNetCore.ReportingServices.ReportProcessing.SubReport subReport = (AspNetCore.ReportingServices.ReportProcessing.SubReport)reportItemDef;
                SubReportInstance subReportInstance = (SubReportInstance)reportItemInstance;
                bool   processedWithError           = false;
                Report innerReport;
                if (AspNetCore.ReportingServices.ReportProcessing.SubReport.Status.Retrieved != subReport.RetrievalStatus)
                {
                    innerReport        = null;
                    processedWithError = true;
                }
                else
                {
                    if (subReport.ReportContext == null && renderingContext.CurrentReportContext != null)
                    {
                        subReport.ReportContext = renderingContext.CurrentReportContext.GetSubreportContext(subReport.ReportPath);
                    }
                    ICatalogItemContext reportContext     = subReport.ReportContext;
                    RenderingContext    renderingContext2 = new RenderingContext(renderingContext, subReport.Uri, subReport.Report.EmbeddedImages, subReport.Report.ImageStreamNames, reportContext);
                    if (subReportInstance == null)
                    {
                        innerReport = new Report(subReport.Report, null, renderingContext2, subReport.ReportName, subReport.Description, null);
                    }
                    else if (subReportInstance.ReportInstance == null)
                    {
                        processedWithError = true;
                        innerReport        = new Report(subReport.Report, null, renderingContext2, subReport.ReportName, subReport.Description, null);
                    }
                    else
                    {
                        innerReport = new Report(subReport.Report, subReportInstance.ReportInstance, renderingContext2, subReport.ReportName, subReport.Description, null);
                    }
                }
                reportItem = new SubReport(intUniqueName, subReport, subReportInstance, renderingContext, innerReport, processedWithError);
            }
            else if (reportItemDef is AspNetCore.ReportingServices.ReportProcessing.List)
            {
                AspNetCore.ReportingServices.ReportProcessing.List reportItemDef8 = (AspNetCore.ReportingServices.ReportProcessing.List)reportItemDef;
                ListInstance reportItemInstance8 = (ListInstance)reportItemInstance;
                reportItem = new List(intUniqueName, reportItemDef8, reportItemInstance8, renderingContext);
            }
            else if (reportItemDef is AspNetCore.ReportingServices.ReportProcessing.Matrix)
            {
                AspNetCore.ReportingServices.ReportProcessing.Matrix reportItemDef9 = (AspNetCore.ReportingServices.ReportProcessing.Matrix)reportItemDef;
                MatrixInstance reportItemInstance9 = (MatrixInstance)reportItemInstance;
                reportItem = new Matrix(intUniqueName, reportItemDef9, reportItemInstance9, renderingContext);
            }
            else if (reportItemDef is AspNetCore.ReportingServices.ReportProcessing.Table)
            {
                AspNetCore.ReportingServices.ReportProcessing.Table reportItemDef10 = (AspNetCore.ReportingServices.ReportProcessing.Table)reportItemDef;
                TableInstance reportItemInstance10 = (TableInstance)reportItemInstance;
                reportItem = new Table(intUniqueName, reportItemDef10, reportItemInstance10, renderingContext);
            }
            else if (reportItemDef is AspNetCore.ReportingServices.ReportProcessing.OWCChart)
            {
                AspNetCore.ReportingServices.ReportProcessing.OWCChart reportItemDef11 = (AspNetCore.ReportingServices.ReportProcessing.OWCChart)reportItemDef;
                OWCChartInstance reportItemInstance11 = (OWCChartInstance)reportItemInstance;
                reportItem = new OWCChart(intUniqueName, reportItemDef11, reportItemInstance11, renderingContext);
            }
            else if (reportItemDef is AspNetCore.ReportingServices.ReportProcessing.Chart)
            {
                AspNetCore.ReportingServices.ReportProcessing.Chart reportItemDef12 = (AspNetCore.ReportingServices.ReportProcessing.Chart)reportItemDef;
                ChartInstance reportItemInstance12 = (ChartInstance)reportItemInstance;
                reportItem = new Chart(intUniqueName, reportItemDef12, reportItemInstance12, renderingContext);
            }
            else if (reportItemDef is AspNetCore.ReportingServices.ReportProcessing.CustomReportItem)
            {
                AspNetCore.ReportingServices.ReportProcessing.CustomReportItem reportItemDef13 = (AspNetCore.ReportingServices.ReportProcessing.CustomReportItem)reportItemDef;
                CustomReportItemInstance reportItemInstance13 = (CustomReportItemInstance)reportItemInstance;
                reportItem = new CustomReportItem(uniqueName, intUniqueName, reportItemDef13, reportItemInstance13, renderingContext, childrenNonComputedUniqueNames);
                if (!renderingContext.NativeAllCRITypes && (renderingContext.NativeCRITypes == null || !renderingContext.NativeCRITypes.ContainsKey(((CustomReportItem)reportItem).Type)))
                {
                    reportItem = ((CustomReportItem)reportItem).AltReportItem;
                }
            }
            return(reportItem);
        }
Ejemplo n.º 4
0
 public ImageMapAreaInstanceList Deconstruct(AspNetCore.ReportingServices.ReportProcessing.ReportProcessing.ProcessingContext processingContext, AspNetCore.ReportingServices.ReportProcessing.CustomReportItem context)
 {
     Global.Tracer.Assert(context != null && null != processingContext);
     if (this.m_list != null && this.m_list.Count != 0)
     {
         int count = this.m_list.Count;
         ImageMapAreaInstanceList imageMapAreaInstanceList = new ImageMapAreaInstanceList(count);
         for (int i = 0; i < count; i++)
         {
             ImageMapAreaInstance value = ((ImageMapArea)this.m_list[i]).Deconstruct(context);
             imageMapAreaInstanceList.Add(value);
         }
         return(imageMapAreaInstanceList);
     }
     return(null);
 }
Ejemplo n.º 5
0
 public CustomReportItem(AspNetCore.ReportingServices.ReportProcessing.CustomReportItem criDef, CustomReportItemInstance criInstance, CustomReportItemInstanceInfo instanceInfo)
     : base(criDef, criInstance, instanceInfo)
 {
     this.m_isProcessing = true;
 }
Ejemplo n.º 6
0
        public void Deconstruct(int uniqueName, ref AspNetCore.ReportingServices.ReportProcessing.Action action, out ActionInstance actionInstance, AspNetCore.ReportingServices.ReportProcessing.CustomReportItem context)
        {
            Global.Tracer.Assert(this.IsCustomControl && null != context);
            actionInstance = null;
            if (this.Processing.m_actionCollection == null || this.Processing.m_actionCollection.Count == 0)
            {
                if (action != null)
                {
                    Global.Tracer.Assert(action.ActionItems != null && 0 < action.ActionItems.Count);
                    int count = action.ActionItems.Count;
                    actionInstance                   = new ActionInstance();
                    actionInstance.UniqueName        = uniqueName;
                    actionInstance.ActionItemsValues = new ActionItemInstanceList(count);
                    for (int i = 0; i < count; i++)
                    {
                        ActionItemInstance actionItemInstance = new ActionItemInstance();
                        if (action.ActionItems[i].DrillthroughParameters != null)
                        {
                            int count2 = action.ActionItems[i].DrillthroughParameters.Count;
                            actionItemInstance.DrillthroughParametersValues = new object[count2];
                            actionItemInstance.DrillthroughParametersOmits  = new BoolList(count2);
                        }
                        actionInstance.ActionItemsValues.Add(actionItemInstance);
                    }
                }
            }
            else
            {
                bool flag   = null == action;
                int  count3 = this.Processing.m_actionCollection.Count;
                Global.Tracer.Assert(1 <= count3);
                if (flag)
                {
                    action             = new AspNetCore.ReportingServices.ReportProcessing.Action();
                    action.ActionItems = new ActionItemList(count3);
                    action.ComputedActionItemsCount = count3;
                }
                else if (count3 != action.ComputedActionItemsCount)
                {
                    context.ProcessingContext.ErrorContext.Register(ProcessingErrorCode.rsCRIRenderItemProperties, Severity.Error, context.CustomObjectType, context.CustomObjectName, context.Type, context.Name, "Actions", action.ComputedActionItemsCount.ToString(CultureInfo.InvariantCulture), count3.ToString(CultureInfo.InvariantCulture));
                    throw new ReportProcessingException(context.ProcessingContext.ErrorContext.Messages);
                }
                actionInstance                   = new ActionInstance();
                actionInstance.UniqueName        = uniqueName;
                actionInstance.ActionItemsValues = new ActionItemInstanceList(count3);
                for (int j = 0; j < count3; j++)
                {
                    Action     action2    = this.Processing.m_actionCollection[j];
                    ActionItem actionItem = null;
                    if (flag)
                    {
                        actionItem = new ActionItem();
                        actionItem.ComputedIndex = j;
                        actionItem.Label         = new ExpressionInfo(ExpressionInfo.Types.Expression);
                        switch (action2.m_actionType)
                        {
                        case ActionType.HyperLink:
                            actionItem.HyperLinkURL = new ExpressionInfo(ExpressionInfo.Types.Expression);
                            break;

                        case ActionType.DrillThrough:
                            actionItem.DrillthroughReportName = new ExpressionInfo(ExpressionInfo.Types.Expression);
                            if (action2.m_parameters != null && 0 < action2.m_parameters.Count)
                            {
                                int count4 = action2.m_parameters.Count;
                                actionItem.DrillthroughParameters = new ParameterValueList(count4);
                                for (int k = 0; k < count4; k++)
                                {
                                    ParameterValue parameterValue = new ParameterValue();
                                    parameterValue.Name           = action2.m_parameters.GetKey(k);
                                    parameterValue.Omit           = new ExpressionInfo(ExpressionInfo.Types.Constant);
                                    parameterValue.Omit.BoolValue = false;
                                    parameterValue.Value          = new ExpressionInfo(ExpressionInfo.Types.Expression);
                                    actionItem.DrillthroughParameters.Add(parameterValue);
                                }
                            }
                            break;

                        case ActionType.BookmarkLink:
                            actionItem.BookmarkLink = new ExpressionInfo(ExpressionInfo.Types.Expression);
                            break;
                        }
                        action.ActionItems.Add(actionItem);
                    }
                    else
                    {
                        actionItem = action.ActionItems[j];
                    }
                    Global.Tracer.Assert(null != actionItem);
                    ActionItemInstance actionItemInstance2 = new ActionItemInstance();
                    actionItemInstance2.Label = action2.Processing.m_label;
                    switch (action2.m_actionType)
                    {
                    case ActionType.HyperLink:
                        actionItemInstance2.HyperLinkURL = action2.Processing.m_action;
                        break;

                    case ActionType.DrillThrough:
                        actionItemInstance2.DrillthroughReportName = action2.Processing.m_action;
                        if (action2.m_parameters != null)
                        {
                            int count5 = action2.m_parameters.Count;
                            if (actionItem.DrillthroughParameters == null && 0 < count5)
                            {
                                context.ProcessingContext.ErrorContext.Register(ProcessingErrorCode.rsCRIRenderItemProperties, Severity.Error, context.CustomObjectType, context.CustomObjectName, context.Type, context.Name, "Action.DrillthroughParameters", "0", count5.ToString(CultureInfo.InvariantCulture));
                                throw new ReportProcessingException(context.ProcessingContext.ErrorContext.Messages);
                            }
                            if (count5 != actionItem.DrillthroughParameters.Count)
                            {
                                context.ProcessingContext.ErrorContext.Register(ProcessingErrorCode.rsCRIRenderItemProperties, Severity.Error, context.CustomObjectType, context.CustomObjectName, context.Type, context.Name, "Action.DrillthroughParameters", actionItem.DrillthroughParameters.Count.ToString(CultureInfo.InvariantCulture), count5.ToString(CultureInfo.InvariantCulture));
                                throw new ReportProcessingException(context.ProcessingContext.ErrorContext.Messages);
                            }
                            Global.Tracer.Assert(0 < count5);
                            actionItemInstance2.DrillthroughParametersValues = new object[count5];
                            actionItemInstance2.DrillthroughParametersOmits  = new BoolList(count5);
                            DrillthroughParameters drillthroughParameters = new DrillthroughParameters(count5);
                            for (int l = 0; l < count5; l++)
                            {
                                actionItemInstance2.DrillthroughParametersValues[l] = action2.m_parameters.GetValues(l);
                                actionItemInstance2.DrillthroughParametersOmits.Add(false);
                                drillthroughParameters.Add(actionItem.DrillthroughParameters[l].Name, actionItemInstance2.DrillthroughParametersValues[l]);
                            }
                            DrillthroughInformation drillthroughInfo = new DrillthroughInformation(actionItemInstance2.DrillthroughReportName, drillthroughParameters, null);
                            string drillthroughId = uniqueName.ToString(CultureInfo.InvariantCulture) + ":" + j.ToString(CultureInfo.InvariantCulture);
                            context.ProcessingContext.DrillthroughInfo.AddDrillthrough(drillthroughId, drillthroughInfo);
                        }
                        break;

                    case ActionType.BookmarkLink:
                        actionItemInstance2.BookmarkLink = action2.Processing.m_action;
                        break;
                    }
                    actionInstance.ActionItemsValues.Add(actionItemInstance2);
                }
                Global.Tracer.Assert(action != null && actionInstance != null && null != this.Processing.m_actionCollection);
                AspNetCore.ReportingServices.ReportProcessing.Style styleClass = action.StyleClass;
                object[] styleAttributeValues = null;
                AspNetCore.ReportingServices.ReportProcessing.CustomReportItem.DeconstructRenderStyle(flag, this.Processing.m_sharedStyles, this.Processing.m_nonSharedStyles, ref styleClass, out styleAttributeValues, context);
                action.StyleClass = styleClass;
                actionInstance.StyleAttributeValues = styleAttributeValues;
            }
        }