Ejemplo n.º 1
0
 internal Report(Microsoft.ReportingServices.ReportProcessing.Report reportDef, ReportInstance reportInstance, RenderingContext renderingContext, string reportName, string description, CultureInfo defaultLanguage)
 {
     m_reportDef        = reportDef;
     m_reportInstance   = reportInstance;
     m_renderingContext = renderingContext;
     m_reportBody       = null;
     m_pageHeader       = null;
     m_pageFooter       = null;
     m_reportPagination = null;
     m_name             = reportName;
     m_description      = description;
     m_reportUrl        = null;
     m_documentMapRoot  = null;
     m_reportParameters = null;
     if (reportDef.Language != null)
     {
         if (reportDef.Language.Type == ExpressionInfo.Types.Constant)
         {
             m_reportLanguage = reportDef.Language.Value;
         }
         else if (reportInstance != null)
         {
             m_reportLanguage = reportInstance.Language;
         }
     }
     if (m_reportLanguage == null && defaultLanguage != null)
     {
         m_reportLanguage = defaultLanguage.Name;
     }
     AdjustBodyWhitespace();
 }
Ejemplo n.º 2
0
        internal static ReportUrl BuildHyperLinkURL(string hyperLinkUrlValue, RenderingContext renderingContext)
        {
            ReportUrl result = null;

            try
            {
                if (hyperLinkUrlValue != null)
                {
                    if (renderingContext.TopLevelReportContext.IsReportServerPathOrUrl(hyperLinkUrlValue, protocolRestriction: false, out bool isRelative) && isRelative)
                    {
                        renderingContext.TopLevelReportContext.PathManager.ExtractFromUrl(hyperLinkUrlValue, out hyperLinkUrlValue, out NameValueCollection queryParameters);
                        if (hyperLinkUrlValue == null || hyperLinkUrlValue.Length == 0)
                        {
                            return(null);
                        }
                        return(new ReportUrl(renderingContext, hyperLinkUrlValue, checkProtocol: false, queryParameters, useReplacementRoot: true));
                    }
                    return(new ReportUrl(renderingContext, hyperLinkUrlValue, checkProtocol: false, null, useReplacementRoot: true));
                }
                return(result);
            }
            catch
            {
                return(null);
            }
        }
Ejemplo n.º 3
0
        internal ReportUrlBuilder(RenderingContext reportContext, string initialUrl, string replacementRoot)
        {
            ICatalogItemContext topLevelReportContext = reportContext.TopLevelReportContext;

            ReportUrl.BuildPathUri(topLevelReportContext, initialUrl, null, out ICatalogItemContext _);
            m_catalogItemUrlBuilder = new CatalogItemUrlBuilder(topLevelReportContext, topLevelReportContext.RSRequestParameters);
            m_replacementRoot       = replacementRoot;
        }
Ejemplo n.º 4
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;
            }
        }
Ejemplo n.º 5
0
 internal ReportUrl(Microsoft.ReportingServices.ReportRendering.ReportUrl renderUrl)
 {
     m_renderUrl = renderUrl;
 }
Ejemplo n.º 6
0
 internal ReportUrlBuilder(RenderingContext reportContext, ICatalogItemContext changedContext, string initialUrl, string replacementRoot)
 {
     ReportUrl.BuildPathUri((changedContext == null) ? reportContext.TopLevelReportContext : changedContext, initialUrl, null, out ICatalogItemContext newContext);
     m_catalogItemUrlBuilder = new CatalogItemUrlBuilder(newContext, newContext.RSRequestParameters);
     m_replacementRoot       = replacementRoot;
 }