private string BuildAbsoluteBookmarkOrSortBaseUrl(bool isSort) { CatalogItemUrlBuilder catalogItemUrlBuilder = BaseBookmarkSortUrl(isSort); if (isSort) { catalogItemUrlBuilder.AppendCatalogParameter("SortId", string.Empty); } return(ReplaceRoot(new Uri(catalogItemUrlBuilder.ToString()).AbsoluteUri)); }
protected internal override void RenderSortAction(RPLTextBoxProps textBoxProps, RPLFormat.SortOptions sortState) { if (m_deviceInfo.AllowScript) { RenderSortOnClick(textBoxProps, sortState); WriteStream(HTMLElements.m_closeBracket); return; } CatalogItemUrlBuilder catalogItemUrlBuilder = BaseBookmarkSortUrl(isSort: true); catalogItemUrlBuilder.AppendCatalogParameter("SortId", textBoxProps.UniqueName); if (sortState == RPLFormat.SortOptions.Descending || sortState == RPLFormat.SortOptions.None) { catalogItemUrlBuilder.AppendCatalogParameter("SortDirection", "Ascending"); } else { catalogItemUrlBuilder.AppendCatalogParameter("SortDirection", "Descending"); } catalogItemUrlBuilder.AppendCatalogParameter("ClearSort", "TRUE"); WriteStream(HTMLElements.m_hrefString + HttpUtility.HtmlAttributeEncode(ReplaceRoot(new Uri(catalogItemUrlBuilder.ToString()).AbsoluteUri)) + HTMLElements.m_closeQuoteString); }
public void AddParameter(string name, string val, UrlParameterType parameterType) { switch (parameterType) { case UrlParameterType.RenderingParameter: m_catalogItemUrlBuilder.AppendRenderingParameter(name, val); break; case UrlParameterType.ReportParameter: m_catalogItemUrlBuilder.AppendReportParameter(name, val); break; case UrlParameterType.ServerParameter: m_catalogItemUrlBuilder.AppendCatalogParameter(name, val); break; } }
private void RenderHead() { string text = null; if (m_mainStream != null) { m_mainStream.Flush(); } if (!m_htmlFragment) { if (m_rplReport.Location != null) { text = m_rplReport.Location; if (text.Length > 0) { WriteStream("<META HTTP-EQUIV=\"Location\" CONTENT=\""); WriteAttrEncoded(text); WriteStream(HTMLElements.m_closeTag); WriteStream("<META HTTP-EQUIV=\"Uri\" CONTENT=\""); WriteAttrEncoded(text); WriteStream(HTMLElements.m_closeTag); } } string description = m_rplReport.Description; if (description != null && 0 < description.Length) { text = description; WriteStream("<META NAME=\"Description\" CONTENT=\""); WriteAttrEncoded(text); WriteStream(HTMLElements.m_closeTag); } string author = m_rplReport.Author; if (author != null && 0 < author.Length) { text = author; WriteStream("<META NAME=\"Author\" CONTENT=\""); WriteAttrEncoded(text); WriteStream(HTMLElements.m_closeTag); } int autoRefresh = m_rplReport.AutoRefresh; if (0 < autoRefresh) { WriteStream("<META HTTP-EQUIV=\"Refresh\" CONTENT=\""); WriteStream(autoRefresh.ToString(CultureInfo.InvariantCulture)); WriteStream(";url="); string reportUrl = m_report.GetReportUrl(addParams: false); CatalogItemUrlBuilder catalogItemUrlBuilder = new CatalogItemUrlBuilder(reportUrl); catalogItemUrlBuilder.AppendCatalogParameter("ResetSession", "True"); if (m_serverParams["SessionID"] != null) { catalogItemUrlBuilder.AppendCatalogParameter("SessionID", m_serverParams["SessionID"]); } catalogItemUrlBuilder.AppendRenderingParameters(m_rawDeviceInfo); if (m_allPages) { catalogItemUrlBuilder.AppendRenderingParameter("Section", "0"); } else { catalogItemUrlBuilder.AppendRenderingParameter("Section", m_pageNum.ToString(CultureInfo.InvariantCulture)); } if (m_deviceInfo.HtmlPrefixId != null && m_deviceInfo.HtmlPrefixId.Length > 0) { catalogItemUrlBuilder.AppendRenderingParameter("PrefixId", m_deviceInfo.HtmlPrefixId); } WriteAttrEncoded(ReplaceRoot(new Uri(catalogItemUrlBuilder.ToString()).AbsoluteUri)); WriteStream(HTMLElements.m_closeQuote); } WriteStream("<META HTTP-EQUIV=\"Last-Modified\" CONTENT=\""); WriteStream(m_rplReport.ExecutionTime.ToUniversalTime().ToString(CultureInfo.InvariantCulture)); WriteStream(HTMLElements.m_closeQuote); if (m_parameters != null) { object obj = null; foreach (ReportParameter parameter in m_parameters) { if (parameter.Name != null && parameter.Instance != null) { WriteStream("<META NAME=\""); WriteAttrEncoded(parameter.Name); WriteStream("\" CONTENT=\""); obj = parameter.Instance.Value; if (obj != null) { WriteAttrEncoded(obj.ToString()); } WriteStream(HTMLElements.m_closeQuote); } } } WriteStream("<META NAME=\"Generator\" CONTENT=\"Microsoft Report 8.0 \"/>"); WriteStream("<META NAME=\"Originator\" CONTENT=\"Microsoft Report 8.0 \"/>"); WriteStyle(HTMLRendererResources.GetBytes("jqueryui.min.css")); WriteStyle(HTMLRendererResources.GetBytes("Html5Renderer.css")); WriteScript(HTMLRendererResources.GetBytes("jquery.min.js")); WriteScript(HTMLRendererResources.GetBytes("Html5Renderer.js")); WriteScript(HTMLRendererResources.GetBytes("Html5RenderingExtensionJs.js")); } RenderHTMLHead(); }