We are using AxInterop.SHDocVw.dll to create the instance of the webbrowser and dispaly the reports generated from SSRS. We don't have any issue while displaying PDF as it appears fine with the toolbar inside the browser. however when we try to open a excel (2003) in the same, it opens a excel window outside the application on the desktop and displays the report with data in the browser. Another instersting thing here is that there is no toolbar visisle in the application's webbrowser.
below is the sample code and screenshots:
private AxSHDocVw.AxWebBrowser ieWebBrowser;
Make a call to SSRS to fetch the report in .xls format and save the report to the local folder which is the value of ‘outputFile’ variable below.
outputFile = Path.Combine(Application.StartupPath,@"ReportsTemp\"+ System.Guid.NewGuid().ToString() + m_ReportName +".xls");
ieWebBrowser.Navigate(outputFile, ref nullObj,
ref nullObj, ref nullObj,
ref nullObj);
when the above code is executed, the file opens in the web browser control. However there is an excel window open in the background. And the web browser control doesn’t have the toolbars/ribbon. And the file open can be modified using the excel window open in the background.
Objective is to have the toolbar in the web browser control and avoid the excel window in the background.
Please let me know how to achieve this.
--VG