Last post May 02, 2013 05:43 AM by anishshenoy_7
Member
40 Points
65 Posts
Apr 03, 2013 04:57 AM|vetrivelan Rajendran|LINK
Hi All,
I need to dirctly call ssrs excel report from my webform Button click.
The below code is not working for me
Dim
rview As New Microsoft.Reporting.WebForms.ReportViewer()
rview.LocalReport.ReportPath =
"Report.rdlc" ' = new Uri(WebConfigurationManager.AppSettings[ReportServer]);
'rview.ServerReport.ReportServerUrl = new Uri(WebConfigurationManager.AppSettings[ReportServer]);
'rview.ServerReport.ReportPath = "Report.rdlc"
Dim mimeType, encoding, extension, deviceInfo As String
Dim streamids As String()
Dim warnings As Microsoft.Reporting.WebForms.Warning()
Dim format As String = "Excel"
deviceInfo =
"<DeviceInfo>" & "<SimplePageHeaders>True</SimplePageHeaders>" & "</DeviceInfo>"
Dim bytes As Byte()
bytes = rview.LocalReport.Render(format, deviceInfo, mimeType, encoding, extension, streamids, warnings)
Response.Clear()
Response.ContentType =
"application/excel"
Response.AddHeader(
"Content-disposition", "filename=output.xls")
Response.OutputStream.Write(bytes, 0, bytes.Length)
Response.OutputStream.Flush()
Response.OutputStream.Close()
Response.Flush()
Response.Close()
Please help me out.
330 Points
104 Posts
May 02, 2013 05:43 AM|anishshenoy_7|LINK
Hi,
I dont know much on VB, but here is the link which will help you do the required thing in C#.
http://gpujanarto.wordpress.com/2012/08/10/load-ssrs-report-from-c-asp-net-and-export-to-excel/
Please let me know in case you need any help understanding the code in the above link.
Regards,
Anish
Member
40 Points
65 Posts
Call local server SSRS Export Excel from my Button click
Apr 03, 2013 04:57 AM|vetrivelan Rajendran|LINK
Hi All,
I need to dirctly call ssrs excel report from my webform Button click.
The below code is not working for me
Dim
rview As New Microsoft.Reporting.WebForms.ReportViewer()
rview.LocalReport.ReportPath =
"Report.rdlc" ' = new Uri(WebConfigurationManager.AppSettings[ReportServer]);
'rview.ServerReport.ReportServerUrl = new Uri(WebConfigurationManager.AppSettings[ReportServer]);
'rview.ServerReport.ReportPath = "Report.rdlc"
Dim mimeType, encoding, extension, deviceInfo As String
Dim streamids As String()
Dim warnings As Microsoft.Reporting.WebForms.Warning()
Dim format As String = "Excel"
deviceInfo =
"<DeviceInfo>" & "<SimplePageHeaders>True</SimplePageHeaders>" & "</DeviceInfo>"
Dim bytes As Byte()
bytes = rview.LocalReport.Render(format, deviceInfo, mimeType, encoding, extension, streamids, warnings)
Response.Clear()
Response.ContentType =
"application/excel"
Response.AddHeader(
"Content-disposition", "filename=output.xls")
Response.OutputStream.Write(bytes, 0, bytes.Length)
Response.OutputStream.Flush()
Response.OutputStream.Close()
Response.Flush()
Response.Close()
Please help me out.
Member
330 Points
104 Posts
Re: Call local server SSRS Export Excel from my Button click
May 02, 2013 05:43 AM|anishshenoy_7|LINK
Hi,
I dont know much on VB, but here is the link which will help you do the required thing in C#.
http://gpujanarto.wordpress.com/2012/08/10/load-ssrs-report-from-c-asp-net-and-export-to-excel/
Please let me know in case you need any help understanding the code in the above link.
Regards,
Anish
http://anishshenoy57.wordpress.com/