public CatalogItemContextBase <TPathStorageType> Combine(string url, bool checkProtocol, bool externalFormat) { if (!IsReportServerPathOrUrl(url, checkProtocol, out bool isRelative)) { return(null); } if (isRelative) { string text = MapUserProvidedPath(url); if (externalFormat && m_PathTranslator != null) { string text2 = m_PathTranslator.PathToExternal(text); if (text2 != null) { text = text2; } } CatalogItemContextBase <TPathStorageType> catalogItemContextBase = CreateContext(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); }
private void InitSubreportContext(CatalogItemContextBase <TPathStorageType> subreportContext, string subreportPath) { string path = MapUserProvidedPath(subreportPath); subreportContext.SetPath(path, ItemPathOptions.Validate); subreportContext.RSRequestParameters.SetCatalogParameters(null); }
public virtual ICatalogItemContext GetSubreportContext(string subreportPath) { CatalogItemContextBase <TPathStorageType> catalogItemContextBase = CreateContext(m_PathTranslator); InitSubreportContext(catalogItemContextBase, subreportPath); catalogItemContextBase.m_primaryContext = m_primaryContext; return(catalogItemContextBase); }
public virtual string AdjustSubreportOrDrillthroughReportPath(string reportPath) { string text; try { text = MapUserProvidedPath(reportPath); } catch (UriFormatException) { return(null); } CatalogItemContextBase <TPathStorageType> catalogItemContextBase = CreateContext(m_PathTranslator); if (!catalogItemContextBase.SetPath(text, ItemPathOptions.Default)) { return(null); } if (Localization.CatalogCultureCompare(text, catalogItemContextBase.ItemPathAsString) == 0) { return(reportPath); } return(catalogItemContextBase.ItemPathAsString); }