Andy Matthews wrote:

> I suspect it might have to do with the location (in code) of the
> cfheader/cfcontent blocks. Aren't they supposed to come first in the doc?

They are supposed to be before the first tag that forces output to the 
browser (cfflush, cflocation, ?).


> lines 20 - 37
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
> <html xmlns="http://www.w3.org/1999/xhtml";>
> <head>
> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
> <title>UPS Report</title>
> </head>
> <body>
> <cfsetting showdebugoutput="No">
> <cfparam name="startDate" default="#DateFormat(now(), "m/d/yyyy")#">
> <cfparam name="dStartDate" default="#DateFormat(now(), "m/d/yyyy")#">
> <!---display date--->
> <cfparam name="endDate" default="#DateFormat(now(), "m/d/yyyy")#">
> <cfparam name="authorized" default="0" type="boolean">
> <cfheader name="Content-Disposition" value="inline;
> filename=Ups_Reporting_#dStartDate#_to_#endDate#.xls">
> <cfcontent type="application/vnd.ms-excel">

Since you have your cfcontent below the start of the output you want to 
send, you need to use the reset="no" attribute. And the content type in 
your meta tag should match what is in your cfcontent. Furthermore, don't 
suggest file names to the browser that may be invalid on their platform 
(e.g. FF on Mac can't handle filenames with a \ in them and will show an 
empty page, there may be more browsers with issues) and you should wrap 
the suggested filename in double quotes.

Jochem

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create robust enterprise, web RIAs.
Upgrade to ColdFusion 8 and integrate with Adobe Flex
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292515
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to