James Shelton Agar
Top achievements
Rank 2
James Shelton Agar
asked on 29 May 2008, 04:26 AM
For redering manually to PDF it is relatve stright forward, as the code below
ReportProcessor.Render("HTML", aContactRPT, Nothing, mime, extension, encode)
however, what rendering Format for Web Archive (mhtml)?
and how about others?
3 Answers, 1 is accepted
0
Hello James,
You can use the MHTML rendering extension if you want to render a report in MHTML. You can find more info on the MHTML rendering extension in this help article that elaborates on its usage. You can specify rendering extension parameters in your application’s configuration file to override the default report rendering behavior.
Note that currently HTML preview would not work under Windows Vista as we are using MHTML for it. We would address this problem by switching to real HTML for the preview, as MHTML is not supported on Vista.
Best wishes,
Steve
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
You can use the MHTML rendering extension if you want to render a report in MHTML. You can find more info on the MHTML rendering extension in this help article that elaborates on its usage. You can specify rendering extension parameters in your application’s configuration file to override the default report rendering behavior.
Note that currently HTML preview would not work under Windows Vista as we are using MHTML for it. We would address this problem by switching to real HTML for the preview, as MHTML is not supported on Vista.
Best wishes,
Steve
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
James Shelton Agar
Top achievements
Rank 2
answered on 29 May 2008, 09:51 PM
Sorry when i have called
Dim buffer() As Byte = ReportProcessor.Render("HTML", aContactRPT, Nothing, mime, extension, encode)
or
Dim buffer() As Byte = ReportProcessor.Render("MHTML", aContactRPT, Nothing, mime, extension, encode)
it doesn't seems to output any data, however, when i render using PDF, it's fine, any idea?
0
Hi James Shelton Agar,
Here is a sample code snippet which exports a report in MHTML format:
Give it a try and if there is still a problem please open a support ticket and send a sample project which can demonstrate it.
Kind regards,
Chavdar
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
Here is a sample code snippet which exports a report in MHTML format:
Dim report As New Report1() |
Dim mimeType As String = String.Empty |
Dim ext As String = String.Empty |
Dim encoding As Encoding = encoding.[Default] |
Dim reportBytes As Byte() = Telerik.Reporting.Processing.ReportProcessor.Render("MHTML", report, Nothing, mimeType, ext, encoding) |
Dim fileName As String = "Report1.mhtml" |
Response.Clear() |
Response.ContentType = mimeType |
Response.Cache.SetCacheability(HttpCacheability.[Private]) |
Response.Expires = -1 |
Response.Buffer = False |
Response.AddHeader("Content-Disposition", String.Format("{0};FileName=""{1}""", "attachment", fileName)) |
Response.OutputStream.Write(reportBytes, 0, reportBytes.Length) |
Response.End() |
Give it a try and if there is still a problem please open a support ticket and send a sample project which can demonstrate it.
Kind regards,
Chavdar
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center