Ejemplo n.º 1
0
        public CatalogItemContextBase <TPathStorageType> Combine(string url, bool checkProtocol, bool externalFormat)
        {
            bool flag = default(bool);

            if (!this.IsReportServerPathOrUrl(url, checkProtocol, out flag))
            {
                return(null);
            }
            if (flag)
            {
                string text = this.MapUserProvidedPath(url);
                if (externalFormat && this.m_PathTranslator != null)
                {
                    string text2 = this.m_PathTranslator.PathToExternal(text);
                    if (text2 != null)
                    {
                        text = text2;
                    }
                }
                CatalogItemContextBase <TPathStorageType> catalogItemContextBase = this.CreateContext(this.m_PathTranslator);
                ItemPathOptions itemPathOptions = ItemPathOptions.Validate;
                itemPathOptions = (ItemPathOptions)((int)itemPathOptions | (externalFormat ? 4 : 2));
                if (!catalogItemContextBase.SetPath(text, itemPathOptions))
                {
                    throw new ItemNotFoundException(text.MarkAsPrivate());
                }
                catalogItemContextBase.RSRequestParameters.SetCatalogParameters(null);
                return(catalogItemContextBase);
            }
            return(null);
        }
Ejemplo n.º 2
0
        private void InitSubreportContext(CatalogItemContextBase <TPathStorageType> subreportContext, string subreportPath)
        {
            string path = this.MapUserProvidedPath(subreportPath);

            subreportContext.SetPath(path, ItemPathOptions.Validate);
            subreportContext.RSRequestParameters.SetCatalogParameters(null);
        }
Ejemplo n.º 3
0
        public virtual ICatalogItemContext GetSubreportContext(string subreportPath)
        {
            CatalogItemContextBase <TPathStorageType> catalogItemContextBase = this.CreateContext(this.m_PathTranslator);

            this.InitSubreportContext(catalogItemContextBase, subreportPath);
            catalogItemContextBase.m_primaryContext = this.m_primaryContext;
            return(catalogItemContextBase);
        }
Ejemplo n.º 4
0
        public virtual string AdjustSubreportOrDrillthroughReportPath(string reportPath)
        {
            string text;

            try
            {
                text = this.MapUserProvidedPath(reportPath);
            }
            catch (UriFormatException)
            {
                return(null);
            }
            CatalogItemContextBase <TPathStorageType> catalogItemContextBase = this.CreateContext(this.m_PathTranslator);

            if (!catalogItemContextBase.SetPath(text, ItemPathOptions.Default))
            {
                return(null);
            }
            if (Localization.CatalogCultureCompare(text, catalogItemContextBase.ItemPathAsString) == 0)
            {
                return(reportPath);
            }
            return(catalogItemContextBase.ItemPathAsString);
        }