August 9, 2015 at 3:56 am
Hi Team,
I have an c# windows application. On export button an excel should popup , this connects to SSRS and then provides the excel.
Issue: When user clicks on Export Button , the report server is opening up in the Internet Explorer,this should not happen, the excel report should be available directly.
August 9, 2015 at 5:44 pm
You haven't posted enough information about how you connect to the report server. Are you using URL parameters, the Reporting Services Web Service, or some feature in the Report Viewer control? Can you post the code behind your export button?
August 9, 2015 at 11:51 pm
Hi,
This is the code
System.Diagnostics.Process objProcess = new System.Diagnostics.Process();
objProcess.StartInfo.FileName = "abc.rdl";
objProcess.StartInfo.Arguments = stringRedirectURL;//"http://server/reports/...."
objProcess.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
objProcess.Start();
objProcess.Close();
August 10, 2015 at 12:34 am
I think your going about it the wrong way. If you just want to display the data in excel then you dont even need SSRS in the middle.
https://msdn.microsoft.com/en-us/library/microsoft.office.tools.excel.extensions%28v=vs.120%29.aspx
Here are the extensions for MS EXcel that you need to use in your C# code
August 10, 2015 at 1:23 am
GonnaCatchIT (8/9/2015)
Hi,This is the code
System.Diagnostics.Process objProcess = new System.Diagnostics.Process();
objProcess.StartInfo.FileName = "abc.rdl";
objProcess.StartInfo.Arguments = stringRedirectURL;//"http://server/reports/...."
objProcess.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
objProcess.Start();
objProcess.Close();
Have a read of Export a Report Using URL Access. It describes how to craft a URL that will render the report in Excel format and display a "File Save" dialog.
August 10, 2015 at 4:11 am
No , I dont need any code on how to export. The system is built to use SSRS to export excel and changing the code is not in scope.
It seems more of browser issue now, as on IE 8 , browser is not shown. But if its IE 11 then browser opens up before is downloaded
August 14, 2015 at 12:36 am
If you can't change it, then there's no way to assure complete browser version compatibility and prevent the browser appearing. You either need to follow Andrew Ps advice, or you would need to modify the application to use the ReportingService/ReportViewer class to render the report properly. An example of that code is found here:
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply