我需要当地RDL报告出口到超文本,最好是超文本。 2005年,它得到官方支持,但有一个 。 在SSRS2008年,他们似乎放弃了这种支持(在用反省计数时,在所支持的延期中,没有超文本延期),而是使用, 而后者是我怀疑某个人会乐于同堂的双手格式。 但实际上,这似乎只是超文本。
现在是否有办法利用SSRS2008当地报告实现超文本?
通知说,我使用VS2008,但使用从VS2010年Beta 2报告审查器安装的报告组件。
我需要当地RDL报告出口到超文本,最好是超文本。 2005年,它得到官方支持,但有一个 。 在SSRS2008年,他们似乎放弃了这种支持(在用反省计数时,在所支持的延期中,没有超文本延期),而是使用, 而后者是我怀疑某个人会乐于同堂的双手格式。 但实际上,这似乎只是超文本。
现在是否有办法利用SSRS2008当地报告实现超文本?
通知说,我使用VS2008,但使用从VS2010年Beta 2报告审查器安装的报告组件。
I found a way, but it s not very good.
Export report to mhtml (it s supported by SSRS2008)
Then use System.Windows.Forms.WebBrowser
for render mhtml.
In wb.DocumentText
property will be full html page.
It s not very good, because you need a file (as url for WebBrowser). And also, if I use WebBrowser in ASP.NET application, I need to process it in another thread, with STA ApartmentState.
寻找同样的东西。 我恳请我相信,我们会试图以某种反思的方式抓住报告已取得的成果?
我也许会同它一道,看看我可以做些什么。
There is a nu-get package here (MIMER will require .NET Framework 3.5):
https://www.nuget.org/packages/MIMER/
using System;
using System.Collections.Generic;
using System.Windows.Forms;
using MIMER;
namespace MimerTest
{
// https://github.com/smithimage/MIMER/blob/master/MIMERTests/MHT/MhtTests.cs
// https://github.com/smithimage/MIMER/
static class Program
{
/// <summary>
/// Der Haupteinstiegspunkt für die Anwendung.
/// </summary>
[STAThread]
static void Main()
{
if (false)
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
System.IO.Stream m_Stream;
string path = @"d:USERNAMEdocumentsvisual studio 2013ProjectsMimerTestMimerTestwhatismht.mht";
System.IO.FileInfo finf = new System.IO.FileInfo(path);
m_Stream = new System.IO.FileStream(path, System.IO.FileMode.Open, System.IO.FileAccess.Read);
var reader = new MIMER.RFC2045.MailReader();
MIMER.IEndCriteriaStrategy endofmessage = new MIMER.RFC2045.BasicEndOfMessageStrategy();
var message = reader.ReadMimeMessage(ref m_Stream, endofmessage);
System.Collections.Generic.IDictionary<string,string> allContents = message.Body;
string strFile = allContents["text/html"];
foreach (System.Collections.Generic.KeyValuePair<string,string> kvp in allContents)
{
System.Console.WriteLine(kvp.Key);
System.Console.WriteLine(kvp.Value);
}
System.Console.WriteLine(" --- Press any key to continue --- ");
System.Console.ReadKey();
}
}
}
在2005年报告《意见书》中,可以通过思考实现超文本:
private static void EnableFormat(ReportViewer viewer, string formatName)
{
const BindingFlags Flags = BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance;
FieldInfo m_previewService = viewer.LocalReport.GetType().GetField
(
"m_previewService",
Flags
);
MethodInfo ListRenderingExtensions = m_previewService.FieldType.GetMethod
(
"ListRenderingExtensions",
Flags
);
object previewServiceInstance = m_previewService.GetValue(viewer.LocalReport);
IList extensions = ListRenderingExtensions.Invoke(previewServiceInstance, null) as IList;
PropertyInfo name = extensions[0].GetType().GetProperty("Name", Flags);
foreach (object extension in extensions)
{
if (string.Compare(name.GetValue(extension, null).ToString(), formatName, true) == 0)
{
FieldInfo m_isVisible = extension.GetType().GetField("m_isVisible", BindingFlags.NonPublic | BindingFlags.Instance);
FieldInfo m_isExposedExternally = extension.GetType().GetField("m_isExposedExternally", BindingFlags.NonPublic | BindingFlags.Instance);
m_isVisible.SetValue(extension, true);
m_isExposedExternally.SetValue(extension, true);
break;
}
}
}
使用:
var Viewer = new Microsoft.Reporting.WebForms.ReportViewer();
EnableFormat(Viewer, "HTML4.0");
您也可以认为这一点令人感兴趣:
http://www.codeproject.com/Articles/239Report-Viewer-generate-reports-MS-Word-formats
I have a stored procedure that returns hierarchical data in a single long row, for example: ContractID | ContractName | AssetID | AssetName | UnitID -----------+--------------+---------+-----------+--...
In a report model I have some entities which have attributes which are integers (set to integer datatype) but should not be summed or aggregated in any way. For examples ID s. But when I create ...
When I save a SQL Report in Excel, a column containing numbers is treated as text in the resulting .xls file. On each row the cell has a green right triangle and a yellow diamond exclamation mark ...
I m dynamically generating RDL files for SSRS 2008, assembling my reports from "building blocks" which I defined as reports on Report Server, and which I use as subreports on my generated report. On ...
In X axis of a column Chart I have a Year (for ex, "2009") and Month (for ex, "Jan") category groupings, and I would like to show just the first month of every quarter like Jan, Apr, Jul, Oct, etc. ...
I have an instance of SQL Server 2008 and SSRS 2008 running on a desktop PC for to be used for development. This PC is registered under my user id and I can remote desktop into it and connect to SSRS ...
I m tasked with reporting on survey data using Reporting Services 2008. My challenge is this: a survey has any number of questions a question is one of three types (a numerical eval, a yes/no ...
I m writting a custom assembly to be referenced in a report. I d like to be able to access the Report object from that assembly, so that I could then access the report parameters and other stuff that ...