Hi,
I'm using Telerik Reporting Q2 in my application. In this, I'm creating report using the following code and it works fine:
Now, I want to add another result in the same report. For that, I did something like this:
But in the resulting PDF, I'm only seeing the final result (I have chart and table inside the report) from the for loop. Does this have a solution? Suppose the for loop have been traversed two times, the resulting PDF should be having chart & table for the first item followed by chart & table for the second item.
Please help asap.
Thanks
I'm using Telerik Reporting Q2 in my application. In this, I'm creating report using the following code and it works fine:
//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();
Now, I want to add another result in the same report. For that, I did something like this:
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();
But in the resulting PDF, I'm only seeing the final result (I have chart and table inside the report) from the for loop. Does this have a solution? Suppose the for loop have been traversed two times, the resulting PDF should be having chart & table for the first item followed by chart & table for the second item.
Please help asap.
Thanks