예제 #1
0
        internal override object PublishClone(AutomaticSubtotalContext context)
        {
            CustomReportItem customReportItem = (CustomReportItem)(context.CurrentDataRegionClone = (CustomReportItem)base.PublishClone(context));

            if (m_dataColumnMembers != null)
            {
                customReportItem.m_dataColumnMembers = new DataMemberList(m_dataColumnMembers.Count);
                foreach (DataMember dataColumnMember in m_dataColumnMembers)
                {
                    customReportItem.m_dataColumnMembers.Add(dataColumnMember.PublishClone(context, customReportItem));
                }
            }
            if (m_dataRowMembers != null)
            {
                customReportItem.m_dataRowMembers = new DataMemberList(m_dataRowMembers.Count);
                foreach (DataMember dataRowMember in m_dataRowMembers)
                {
                    customReportItem.m_dataRowMembers.Add(dataRowMember.PublishClone(context, customReportItem));
                }
            }
            if (m_dataRows != null)
            {
                customReportItem.m_dataRows = new CustomDataRowList(m_dataRows.Count);
                foreach (CustomDataRow dataRow in m_dataRows)
                {
                    customReportItem.m_dataRows.Add((CustomDataRow)dataRow.PublishClone(context));
                }
            }
            context.CreateSubtotalsDefinitions.Add(customReportItem);
            return(customReportItem);
        }
예제 #2
0
        internal override object PublishClone(AutomaticSubtotalContext context)
        {
            ReportItemCollection reportItemCollection = (ReportItemCollection)base.PublishClone(context);

            context.AddReportItemCollection(reportItemCollection);
            if (m_entries != null)
            {
                CustomReportItem customReportItem = null;
                reportItemCollection.m_entries = new List <ReportItem>();
                foreach (ReportItem entry in m_entries)
                {
                    ReportItem reportItem = (ReportItem)entry.PublishClone(context);
                    reportItemCollection.m_entries.Add(reportItem);
                    if (reportItem is CustomReportItem)
                    {
                        Global.Tracer.Assert(customReportItem == null, "(lastCriPublishClone == null)");
                        customReportItem = (CustomReportItem)reportItem;
                    }
                    else if (customReportItem != null)
                    {
                        customReportItem.AltReportItem = reportItem;
                        customReportItem = null;
                    }
                }
                Global.Tracer.Assert(customReportItem == null, "(lastCriPublishClone == null)");
            }
            if (m_linkToChildName != null)
            {
                reportItemCollection.m_linkToChildName = context.GetNewReportItemName(m_linkToChildName);
            }
            return(reportItemCollection);
        }
예제 #3
0
 internal bool IsRenderAsNativeCri(Microsoft.ReportingServices.ReportIntermediateFormat.CustomReportItem criDef)
 {
     if (m_nativeAllCRITypes)
     {
         return(true);
     }
     if (m_nativeCRITypes != null && m_nativeCRITypes.ContainsKey(criDef.Type))
     {
         return(true);
     }
     return(false);
 }
예제 #4
0
 private static void ProcessAlternateCustomReportItem(Microsoft.ReportingServices.ReportIntermediateFormat.CustomReportItem criDef, ReportItem reportItem, RenderingContext renderingContext)
 {
     if (!criDef.ExplicitlyDefinedAltReportItem)
     {
         string text = null;
         Global.Tracer.Assert(renderingContext.OdpContext.ExtFactory != null, "ExtFactory != null.");
         if (!renderingContext.OdpContext.ExtFactory.IsRegisteredCustomReportItemExtension(criDef.Type))
         {
             renderingContext.OdpContext.TopLevelContext.ErrorContext.Register(ProcessingErrorCode.rsCRIControlNotInstalled, Severity.Warning, ObjectType.CustomReportItem, criDef.Name, criDef.Type);
             text = "The '{1}.{0}' extension is not present in the configuration file: The element '{2}' will render the AltReportItem, which is not defined. Therefore, it shows an empty space.";
         }
         else
         {
             renderingContext.ErrorContext.Register(ProcessingErrorCode.rsCRIControlFailedToLoad, Severity.Warning, ObjectType.CustomReportItem, criDef.Name, criDef.Type);
             text = "The '{1}.{0}' extension failed to load: The element '{2}' will render the AltReportItem, which is not defined. Therefore, it shows an empty space.";
         }
         Global.Tracer.Trace(TraceLevel.Verbose, text, criDef.Name, criDef.Type, reportItem.Name);
     }
 }
예제 #5
0
 internal DataMember(int id, CustomReportItem crItem)
     : base(id, crItem)
 {
 }
예제 #6
0
 internal RuntimeCriObj(IReference <IScope> outerScope, Microsoft.ReportingServices.ReportIntermediateFormat.CustomReportItem criDef, ref DataActions dataAction, OnDemandProcessingContext odpContext, bool onePassProcess)
     : base(outerScope, criDef, ref dataAction, odpContext, onePassProcess, Microsoft.ReportingServices.ReportProcessing.ObjectType.CustomReportItem)
 {
 }
 internal CustomReportItem(IReportScope reportScope, IDefinitionPath parentDefinitionPath, int indexIntoParentCollectionDef, Microsoft.ReportingServices.ReportIntermediateFormat.CustomReportItem reportItemDef, RenderingContext renderingContext)
     : base(reportScope, parentDefinitionPath, indexIntoParentCollectionDef, reportItemDef, renderingContext)
 {
     m_indexIntoParentCollectionDef = indexIntoParentCollectionDef;
 }
예제 #8
0
        internal static ReportItem CreateItem(IReportScope reportScope, IDefinitionPath parentDefinitionPath, int indexIntoParentCollectionDef, Microsoft.ReportingServices.ReportIntermediateFormat.ReportItem reportItemDef, RenderingContext renderingContext)
        {
            ReportItem reportItem = null;

            switch (reportItemDef.ObjectType)
            {
            case ObjectType.Textbox:
                reportItem = new TextBox(reportScope, parentDefinitionPath, indexIntoParentCollectionDef, (Microsoft.ReportingServices.ReportIntermediateFormat.TextBox)reportItemDef, renderingContext);
                break;

            case ObjectType.Rectangle:
                reportItem = new Rectangle(reportScope, parentDefinitionPath, indexIntoParentCollectionDef, (Microsoft.ReportingServices.ReportIntermediateFormat.Rectangle)reportItemDef, renderingContext);
                break;

            case ObjectType.Image:
                reportItem = new Image(reportScope, parentDefinitionPath, indexIntoParentCollectionDef, (Microsoft.ReportingServices.ReportIntermediateFormat.Image)reportItemDef, renderingContext);
                break;

            case ObjectType.Line:
                reportItem = new Line(reportScope, parentDefinitionPath, indexIntoParentCollectionDef, (Microsoft.ReportingServices.ReportIntermediateFormat.Line)reportItemDef, renderingContext);
                break;

            case ObjectType.Subreport:
                reportItem = new SubReport(reportScope, parentDefinitionPath, indexIntoParentCollectionDef, (Microsoft.ReportingServices.ReportIntermediateFormat.SubReport)reportItemDef, renderingContext);
                break;

            case ObjectType.Tablix:
                reportItem = new Tablix(parentDefinitionPath, indexIntoParentCollectionDef, (Microsoft.ReportingServices.ReportIntermediateFormat.Tablix)reportItemDef, renderingContext);
                break;

            case ObjectType.Chart:
                reportItem = new Chart(parentDefinitionPath, indexIntoParentCollectionDef, (Microsoft.ReportingServices.ReportIntermediateFormat.Chart)reportItemDef, renderingContext);
                break;

            case ObjectType.GaugePanel:
                reportItem = new GaugePanel(parentDefinitionPath, indexIntoParentCollectionDef, (Microsoft.ReportingServices.ReportIntermediateFormat.GaugePanel)reportItemDef, renderingContext);
                break;

            case ObjectType.CustomReportItem:
            {
                Microsoft.ReportingServices.ReportIntermediateFormat.CustomReportItem customReportItem = (Microsoft.ReportingServices.ReportIntermediateFormat.CustomReportItem)reportItemDef;
                reportItem = new CustomReportItem(reportScope, parentDefinitionPath, indexIntoParentCollectionDef, customReportItem, renderingContext);
                if (!((CustomReportItem)reportItem).Initialize(renderingContext))
                {
                    reportItem = CreateItem(reportScope, parentDefinitionPath, customReportItem.AltReportItemIndexInParentCollectionDef, customReportItem.AltReportItem, renderingContext);
                    reportItem.ReportItemDef.RepeatedSibling = customReportItem.RepeatedSibling;
                    reportItem.ReportItemDef.RepeatWith      = customReportItem.RepeatWith;
                    ProcessAlternateCustomReportItem(customReportItem, reportItem, renderingContext);
                }
                break;
            }

            case ObjectType.Map:
                reportItem = new Map(reportScope, parentDefinitionPath, indexIntoParentCollectionDef, (Microsoft.ReportingServices.ReportIntermediateFormat.Map)reportItemDef, renderingContext);
                break;
            }
            return(reportItem);
        }