Maybe I'm making this harder than it is (that's usual for me....)
It sounds easy enough-but I am stuck- let me show you my code

I have this:
<!---Loop through the narratives for this student--->
<CFLOOP INDEX= "X" FROM ="1" TO= "#NarrativeGet.RecordCount#">
<CFSET I= ToString(X)>
<!---Set the fields for ActivePDF--->
<CFSET "EduLevelNarative#I#"
=Tlkt.SetFormFieldData("EduLevelNarrative#I#","#NarrativeGet.EduLevelNarrati
ve[I]#",0)>
<!---Here is my test output of the data- it shows correctly the length of
each narrative-
So the question is how do I get a sum or/do narrative + narrative +narrative
to get blocks of 5000?--->
<CFOUTPUT>#(Len(NarrativeGet.EduLevelNarrative[I])#
</CFOUTPUT>
</CFLOOP>
Thanks,
j

-----Original Message-----
From: Ben Doom [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 11, 2003 5:17 PM
To: CF-Talk
Subject: RE: Character count on record count??/


: 2.  count the characters used in each narrative.

Retrieve the narratives and use len() on them.  Probably add some to it to
allow a break between narratives.

: 3.  Output the narratives in chuncks of 5000 characters. (or to the
: narratives that come close to 5000) For example
: narrative1=2000 characters
: narrative2= 50 characters
: narrative3=1000 characters
: narrative4=2000 characters
: so the page would only show the first 3 narratives

Since you (apparently) want them to show up in order, look at the first.  If
it's length is less than 5000 (I assume it always will be, is this true?),
add it to the 1st page and add its length to the total length of the first
page.  Repeat.  If the total length of the page will exceed 5000, start a
new page.

: Make sense? doable??

Yes and yes, I think.  :-)


--  Ben Doom
    Programmer & General Lackey
    Moonbow Software, Inc



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Get the mailserver that powers this list at http://www.coolfusion.com

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to