internal static string BuildDrillthroughUrl(ICatalogItemContext currentCatalogItemContext, string initialUrl, NameValueCollection parameters)
        {
            if (BuildPathUri(currentCatalogItemContext, checkProtocol: true, initialUrl, parameters, out ICatalogItemContext newContext) == null || newContext == null)
            {
                return(null);
            }
            CatalogItemUrlBuilder catalogItemUrlBuilder = new CatalogItemUrlBuilder(newContext, newContext.RSRequestParameters);

            catalogItemUrlBuilder.AppendReportParameters(parameters);
            return(new Uri(catalogItemUrlBuilder.ToString()).AbsoluteUri);
        }
Example #2
0
        public static string BuildDrillthroughUrl(ICatalogItemContext currentCatalogItemContext, string initialUrl, NameValueCollection parameters)
        {
            ICatalogItemContext catalogItemContext = default(ICatalogItemContext);
            string text = ReportUrl.BuildPathUri(currentCatalogItemContext, true, initialUrl, parameters, out catalogItemContext);

            if (text != null && catalogItemContext != null)
            {
                CatalogItemUrlBuilder catalogItemUrlBuilder = new CatalogItemUrlBuilder(catalogItemContext, catalogItemContext.RSRequestParameters);
                catalogItemUrlBuilder.AppendReportParameters(parameters);
                Uri uri = new Uri(catalogItemUrlBuilder.ToString());
                return(uri.AbsoluteUri);
            }
            return(null);
        }
Example #3
0
        public string GetReportUrl(bool addReportParameters)
        {
            if (m_isOldSnapshot)
            {
                return(new ReportUrlBuilder(m_renderReport.RenderingContext, null, useReplacementRoot: true, addReportParameters).ToString());
            }
            CatalogItemUrlBuilder catalogItemUrlBuilder = new CatalogItemUrlBuilder(m_renderingContext.OdpContext.ReportContext);

            if (addReportParameters && Parameters != null)
            {
                NameValueCollection toNameValueCollection = Parameters.ToNameValueCollection;
                catalogItemUrlBuilder.AppendReportParameters(toNameValueCollection);
            }
            return(catalogItemUrlBuilder.ToString());
        }
Example #4
0
        public string GetReportUrl(bool addReportParameters)
        {
            if (this.m_isOldSnapshot)
            {
                return(new ReportUrlBuilder(this.m_renderReport.RenderingContext, null, true, addReportParameters).ToString());
            }
            ICatalogItemContext   reportContext         = this.m_renderingContext.OdpContext.ReportContext;
            CatalogItemUrlBuilder catalogItemUrlBuilder = new CatalogItemUrlBuilder(reportContext);

            if (addReportParameters && this.Parameters != null)
            {
                NameValueCollection toNameValueCollection = this.Parameters.ToNameValueCollection;
                catalogItemUrlBuilder.AppendReportParameters(toNameValueCollection);
            }
            return(catalogItemUrlBuilder.ToString());
        }
Example #5
0
        public void AddParameters(NameValueCollection urlParameters, UrlParameterType parameterType)
        {
            switch (parameterType)
            {
            case UrlParameterType.RenderingParameter:
                m_catalogItemUrlBuilder.AppendRenderingParameters(urlParameters);
                break;

            case UrlParameterType.ReportParameter:
                m_catalogItemUrlBuilder.AppendReportParameters(urlParameters);
                break;

            case UrlParameterType.ServerParameter:
                m_catalogItemUrlBuilder.AppendCatalogParameters(urlParameters);
                break;
            }
        }
Example #6
0
        internal ReportUrlBuilder(RenderingContext reportContext, string initialUrl, bool useReplacementRoot, bool addReportParameters)
        {
            ICatalogItemContext topLevelReportContext = reportContext.TopLevelReportContext;
            ICatalogItemContext newContext;
            string pathOrUrl = ReportUrl.BuildPathUri(topLevelReportContext, initialUrl, null, out newContext);

            m_catalogItemUrlBuilder = new CatalogItemUrlBuilder(topLevelReportContext, topLevelReportContext.RSRequestParameters);
            if (addReportParameters)
            {
                m_catalogItemUrlBuilder.AppendReportParameters(reportContext.TopLevelReportContext.RSRequestParameters.ReportParameters);
            }
            m_useRepacementRoot = useReplacementRoot;
            if (reportContext != null && reportContext.TopLevelReportContext.IsReportServerPathOrUrl(pathOrUrl, protocolRestriction: true, out bool _))
            {
                m_replacementRoot = reportContext.ReplacementRoot;
            }
        }