<my:ReportViewer Name="reportViewer1" Height="220" />
<%
@ServiceHost Service="Telerik.Reporting.Service.ReportService, Telerik.Reporting.Service, Version=5.3.11.1116, Culture=neutral, PublicKeyToken=A9D7983DFCC261BE" %>
I have Create the report and tried to exprot programatially like below, but styles does not seem to be exproted.
TRANS_DELIVERY_REPORT
report = new TRANS_DELIVERY_REPORT();
Telerik.Reporting.Processing.
ReportProcessor reportProcessor = new Telerik.Reporting.Processing.ReportProcessor();
Telerik.Reporting.Processing.
RenderingResult result = reportProcessor.RenderReport("XLS", report, null);
FileStream fs = new FileStream("C:\\report1.xls", FileMode.Create);
fs.Write(result.DocumentBytes, 0, result.DocumentBytes.Length);
fs.Flush();
fs.Close();
can any one please let me know what need to be done? thank you.
CO = (System.Drawing.
Color)ColorTranslator.FromHtml("#a17e9a");
txtEvent.Style.BackgroundColor = CO;
Please help me to find what is the error and why in PDF work right and in Excel not.
Thanks
//Code that calls the report designer goes here
ReportProcessor processor =
new
ReportProcessor();
RenderingResult result = processor.RenderReport(
"PDF"
, report,
null
);
string
fileName =
"Report"
+
string
.Format(
"{0:yyyy-MM-dd_hh-mm-ss-tt}"
, DateTime.Now) +
".pdf"
;
Response.ContentType =
"application/pdf"
;
Response.AddHeader(
"Content-Disposition"
,
"attachment; filename="
+ fileName);
Response.ClearContent();
Response.OutputStream.Write(result.DocumentBytes, 0, result.DocumentBytes.Length);
Response.End();
byte
[] documentBytes =
new
List<
byte
>().ToArray();
for
(
int
i=0; i<count; i++)
{
//Code that calls the report designer goes here
ReportProcessor processor =
new
ReportProcessor();
RenderingResult result = processor.RenderReport(
"PDF"
, report,
null
);
documentBytes = documentBytes.Concat(result.DocumentBytes).ToArray();
}
string
fileName =
"Report"
+
string
.Format(
"{0:yyyy-MM-dd_hh-mm-ss-tt}"
, DateTime.Now) +
".pdf"
;
Response.ContentType =
"application/pdf"
;
Response.AddHeader(
"Content-Disposition"
,
"attachment; filename="
+ fileName);
Response.ClearContent();
Response.OutputStream.Write(documentBytes, 0, documentBytes.Length);
Response.End();