Hi;
(Use 2009.Q1)
i am writing my own web browser. And from that browser, i try to export a report to pdf. But when you click on the Export functionality, it opens the export operation on Internet Explorer (a different web browser of course...). And because the instance ids of my own web browser and internet explorer's are different, exporting fails. Now that, i need to export the report on the same page by writing code behind a button control or by changing the functionality of WebReportViewer to export the report to the _self window.
First of all, i am using a code snippet that would display the report in the same page with my web browser (by implementing a button control's event). The code snippet is:
http://www.telerik.com/help/reporting/faq-display-pdf-browser.html
Although i have imported Telerik.Reporting and Telerik.Reporting.Processing libraries, the compiler tells me that "ReportProcessor" is ambigious in the namespace Telerik.Reporting.Processing. Why do i get this error?
As a second question, i tried to open the exported sheet in the same window by using WebReportViewer with _self directive. But i failed again because of the different instance ids of web browsers...
Any ideas about exporting the report to _self window would be appreciated!.
Thanx
(Use 2009.Q1)
i am writing my own web browser. And from that browser, i try to export a report to pdf. But when you click on the Export functionality, it opens the export operation on Internet Explorer (a different web browser of course...). And because the instance ids of my own web browser and internet explorer's are different, exporting fails. Now that, i need to export the report on the same page by writing code behind a button control or by changing the functionality of WebReportViewer to export the report to the _self window.
First of all, i am using a code snippet that would display the report in the same page with my web browser (by implementing a button control's event). The code snippet is:
http://www.telerik.com/help/reporting/faq-display-pdf-browser.html
Sub
ExportToPDF(
ByVal
reportToExport
As
Telerik.Reporting.Report)
Dim
reportProcessor
As
New
ReportProcessor()
Dim
result
As
RenderingResult = reportProcessor.RenderReport(
"PDF"
, reportToExport,
Nothing
)
Dim
fileName
As
String
= result.DocumentName +
".pdf"
Response.Clear()
Response.ContentType = result.MimeType
Response.Cache.SetCacheability(HttpCacheability.
Private
)
Response.Expires = -1
Response.Buffer =
True
Response.AddHeader(
"Content-Disposition"
,
String
.Format(
"{0};FileName="
"{1}"
""
,
"attachment"
, fileName))
Response.BinaryWrite(result.DocumentBytes)
Response.
End
()
End
Sub
Although i have imported Telerik.Reporting and Telerik.Reporting.Processing libraries, the compiler tells me that "ReportProcessor" is ambigious in the namespace Telerik.Reporting.Processing. Why do i get this error?
As a second question, i tried to open the exported sheet in the same window by using WebReportViewer with _self directive. But i failed again because of the different instance ids of web browsers...
Any ideas about exporting the report to _self window would be appreciated!.
Thanx