Yep, after reading it again, the comment IS ugl.  Problem is, what I was
trying to say is not clear.  Emotion...so hard to convey.  The "wow" part
was simply, "I can't believe you guys know this stuff, let alone how to use
it."  The "WHY" was to show my excitement to learn something new and how it
works.  The "assumption" statement was "OK, I'm ready to start learning
about this, but, what if it isn't cfsavecontent that I should be studying.
I better get some confirmation that I'm headed down the right road."
Fortunately, Chris stepped in and DID send me in a different direction.
Thank You Chris.

Thanks to All
Jamie

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of
Chris Stoner
Sent: Friday, March 03, 2006 7:54 AM
To: [email protected]
Subject: Re: [CFCDev] CSV and blank lines


This is not a cf_savecontent trick as much as it is a coldfusion trick.
Since the line breaks and spaces between the tags arg commented out the cold
fusion compiler ignores them as if the tags were side by side.  You can also
do this with the same results, but it tends to makes people feel uneasy as
it 'seems' like it should break and is kind of ugl (but so is the comment
suggestion):

<cfsavecontent variable="dailyDif"
   ><cfoutputquery="work4"
        >1,22,"GJ","Locations","DailyReport","#Account#",#Total#><
   /cfoutput
></cfsavecontent>


On 3/2/06, Jamie Tieman <[EMAIL PROTECTED]> wrote:
wow, now I have to figure out WHY that works and I assume that means read up
on cfsavecontent.

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Behalf Of Bill Rawlinson
Sent: Thursday, March 02, 2006 4:10 PM
To: [email protected]
Subject: Re: [CFCDev] CSV and blank lines


that is a great idea.

On 3/2/06, Jon Gunnip < [EMAIL PROTECTED]> wrote:
> Another method that is useful occasionally is to use CF comments to
> avoid the unwanted line breaks.
>
> For example:
> <cfsavecontent variable="dailyDif"><!---
> ---><cfoutput
query="work4">1,22,"GJ","Locations","DailyReport","#Account#",#Total#
> </cfoutput><!---
> ---></cfsavecontent>
>
> Sometimes it is more readable than string concatenation.
>
> Jon
>
> On 3/1/06, Jamie Tieman <[EMAIL PROTECTED]> wrote:
> > I have a CFC that is trying to create a CSV file, save it to the server,
and
> > then have an FTP program download it.
> > Problem is, I end up with blank lines at the end of my file.  If I put
the
> > [cfoutput query="work4"] on a separate line, I get a blank line first,
data,
> > and then the 3 blank lines, this way I only get the blank lines at the
end.
> >
> > Here's the code:
> >
> > <cfsavecontent variable="dailyDif">
> > <cfoutput query="work4">1,22,"GJ","Locations","Daily
> > Report","#Account#",#Total#
> > </cfoutput>
> > </cfsavecontent>
> > <cfset fileDir = "[server directory
> >
string]#Args.inCompanyNo#\#Args.inYear#\#Left(MonthAsString(Args.inMonth),3)
> > #\" />
> > <cfset filename =
> >
"#fileDir##arguments.Args.inCompanyNo#_DailyDif_#Left(MonthAsString(Args.inM
> > onth),3)#.csv"/>
> > <cffile action="write" file="#filename#" output="#dailyDif#">
> >
> > And this is what I end up with.
> >
> > 1,22,"GJ","Locations","Daily Report","036000",-23429.67
> > 1,22,"GJ","Locations","Daily Report","050500",- 148080.60
> >
> >
> > And that looks great, BUT it has 3 blank lines at the end even if I do a
> > cfloop for one record.
> >
> > Any help would be greatly appreciated,
> > Jamie
> >
> >
> >
> > ----------------------------------------------------------
> > You are subscribed to cfcdev. To unsubscribe, send an email to
[email protected] with the words 'unsubscribe cfcdev' as the subject of the
email.
> >
> > CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting
(www.cfxhosting.com).
> >
> > An archive of the CFCDev list is available at
www.mail-archive.com/[email protected]
> >
> >
> >
>
>
> ----------------------------------------------------------
> You are subscribed to cfcdev. To unsubscribe, send an email to
[email protected] with the words 'unsubscribe cfcdev' as the subject of the
email.
>
> CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting
( www.cfxhosting.com).
>
> An archive of the CFCDev list is available at
www.mail-archive.com/[email protected]
>
>
>


--
[EMAIL PROTECTED]
http://blog.rawlinson.us

If you want Gmail - just ask.


----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to
[email protected] with the words 'unsubscribe cfcdev' as the subject of the
email.

CFCDev is run by CFCZone ( www.cfczone.org) and supported by CFXHosting
(www.cfxhosting.com).

An archive of the CFCDev list is available at
www.mail-archive.com/[email protected]






----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to
[email protected] with the words 'unsubscribe cfcdev' as the subject of the
email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (
www.cfxhosting.com).

An archive of the CFCDev list is available at
www.mail-archive.com/[email protected]




----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to
[email protected] with the words 'unsubscribe cfcdev' as the subject of the
email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting
(www.cfxhosting.com).

An archive of the CFCDev list is available at
www.mail-archive.com/[email protected]



----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to 
[email protected] with the words 'unsubscribe cfcdev' as the subject of the 
email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting 
(www.cfxhosting.com).

An archive of the CFCDev list is available at 
www.mail-archive.com/[email protected]


Reply via email to