Focal Point
Excel Issue - Forcing how to open?

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/9221065291

October 23, 2006, 12:34 PM
isjhb
Excel Issue - Forcing how to open?
I currently have a report that is initially run as an HTML report. This report will appear in my browser window. From there the user has the option to open this as an excel/pdf document. When the user selects excel, the report may or may not open in the current browser depending on their settings. Since a number of the users our outside it is impossible to control how this is set. I'm trying to think of a resonible solution. Is there a was to keep the current HTML document open in the browser and then when they select excel that the report is then forced to open in a separate window. Is there a script that can be added to force the users settings to 'open excel in browser'. Does anyone know how to get either of these to work or have any other solutions. It would be greatly appreciated.
October 24, 2006, 09:06 PM
jimbo
we do this today for our users by putting an Excel & PDF image in the heading of the HTML (default) report. we assign a variable to the image in the heading and then allow the user to choose if they want to continue in their preferred format- HTML,PDF & Excel2000. We do this as a drill within the stylesheet coding like this-
TABLE FILE ???
PRINT *
ON TABLE PCHOLD FORMAT '&FORMAT'
TYPE=HEADING, IMAGEBREAK=ON, IMAGE=\ibi_html\icons\excel.gif, IMAGEALIGN=LEFT,
FOCEXEC=YOURFEX(FORMAT=EXL2K), TARGET=_blank,$

The TARGET=_blank forces a new window to open. Excel 2000 also respects the HTML styling and drill downs if they exist.


7.7.04
Win2K3, Unix
Oracle 10G,SQL2K,XFOCUS,ESRI,BID,MRE,SELF-SERVICCE
October 31, 2006, 07:03 AM
<sandy_16>
Make a copy of the report with excel as output format and create a push button with a hyperlink to open the excel report.This is the simplest way of doing.You can give options to open in separate window or the same one also.
October 31, 2006, 04:08 PM
Fernando
quote:
Is there a script that can be added to force the users settings to 'open excel in browser'


There is no script that can do this. Security restrictions prevent a web page from changing browser behaviour.

Fernando


Prod WF 8.1.04, QA WF 8.2.03, Dev WF 8.2.03
October 31, 2006, 08:30 PM
EJL
If all you want is to open the Excel report in a separate window, Jimbo has given you the answer with the target="_blank" statement.

That's the easy part. Controlling the behavior of the Excel report is much harder. Whether it opens immediately or the user is prompted, whether it opens in the browser or in Excel, etc. are all things based on how the end user's PC is configured to handle the various mime types that WF outputs. Because you can't control the end user's configuration, you have to do the best you can and hope the user has a clue.