nathans and cj

Just thought that I would let you know that I have gotten the page count and page break to work so printing a report from the web can be done.

reference questions:

cj's help: http://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=coldfusion&qid=20293490

Nathans help:http://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=coldfusion&qid=20295036

this is the syntax that I got from combining both of your codes a doing a lil fooling around.


<style media="print">
BR.pageBreak { page-break-after: always }
</style>

<cfset numberOfRecordsBeforeHeaderDisplay = 42>
<cfset pageBreakCounter = 0>

<cfset numberofrecords = "#yourquery.recordcount#">
<Cfset TotalPages =  numberofrecords/numberOfRecordsBeforeHeaderDisplay >

<cfset page =1>


<cfoutput query="yourQuery">
<!--- Display header --->
<cfif yourQuery.currentRow mod numberOfRecordsBeforeHeaderDisplay EQ 1>
<cfif pageBreakCounter eq 0>
 
   <table>
   <tr>
</cfif>
<cfset pageBreakCounter = IncrementValue(pageBreakCounter)>
 <td>
 <table>
   <tr><td>... header html </td></tr>
</cfif>
<!--- table cell display --->
display your data here.


<!--- Display close table --->
<cfif yourQuery.currentRow mod numberOfRecordsBeforeHeaderDisplay EQ 0 OR yourQuery.currentRow EQ yourQuery.recordCount>
 </table>
 </td>
   <cfif pageBreakCounter mod 2 eq 0 OR yourQuery.currentRow EQ yourQuery.recordCount>
     <cfset pageBreakCounter = 0>
     <!--- close newspaper table --->
     </tr></table>
     
   </cfif>
</cfif>
</cfoutput>
<br class="pageBreak">
<cfset page=page+1>

Now you can place #page# anywhere you want it and the page will break and you will now have a running
count of pages ie.

page1
akjdsfalks

page 2
alksdj
jriver12Asked:
Who is Participating?
 
cheekycjCommented:
I have too many excuses, besides vacation and other things :-(

I haven't gotten it to work, sorry.  Its frusterating b/c I know its not that hard to do, I am just not able to get it to work.

CJ
0
 
cheekycjCommented:
looks good, do you need help modifying it to something different?

CJ
0
 
jriver12Author Commented:
no not at all just wanted to let you guys know that Your assistance is appreciated, and that people do take your suggestions and run with em.


Thanks I've learned alot
0
Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

 
cheekycjCommented:
that is actually very gratifying to know.  Esp when someone can take our suggestions and modify/merge them into exactly what they need.

Thats great.

CJ
0
 
jriver12Author Commented:
I think nathans out of town or something, since he hasnt responded to the thread.

so, ya want these miserable 50pts.
0
 
cheekycjCommented:
lets hold out for nathans.. he should be along shortly.
0
 
jriver12Author Commented:
Sounds like a plan cj.

it is rather disturbing that I could not post this question(its realy not) for 0 points, I just wanted to make sure that you guys would see it.
0
 
cheekycjCommented:
really?  That is strange.. I thought you could post 0 pt questions.. maybe its recent change.

CJ
0
 
jriver12Author Commented:
yeah, I think its new my self, I tried and it told me that it had to have a value =>50.

oh well.
0
 
cheekycjCommented:
you can just delete this question :-)
0
 
jriver12Author Commented:
cj, would you mind converting this into a valid question.

I have a script that contains js and cf and I have been working on it for a while and I am still getting object expectd errors and undesired results.

the script is hard (for me),sloppy and hard to follow.

what do  ya say if you agree I could send you the page by email(if you provide a address) this code is huge(for me).

I will raise points because it it way over 50 pts.
0
 
cheekycjCommented:
sure... send it my way:

cheekycj@yahoo.com

CJ
0
 
jriver12Author Commented:
thanks cj.
0
 
Nathan Stanford SrSenior ProgrammerCommented:
Sorry I am here what is up.
0
 
Nathan Stanford SrSenior ProgrammerCommented:
I don't come here as often as I used to been to involved with RL (Real Life), my two boys, My wife, EverQuest, My website (www.cftipsplus.com), My work, My other website for my wife (www.nsnd.com/cakes) and much more of course... sorry.  Thanks, I do it for FUN too.  I miss when I used to love the points.
0
 
jriver12Author Commented:
Just would like to extend my thanks for all the help in the past and I sure you'll help out again in the future.

I am a frequent at www.cftipsplus.com too. thanks again.
0
 
jriver12Author Commented:
any luck cj?
0
 
cheekycjCommented:
Hi,
  Sorry for not responding or giving any feedback but work has been very hectic and crazy.  I will try to take a look at the code today.

CJ
0
 
jriver12Author Commented:
I was just checking if there  was still intrest.

no rush, take your time.
thanks
0
 
jriver12Author Commented:
Any luck? :^)
0
 
cheekycjCommented:
I have to split up the checkform() function.  But to do that I need to know what is supposed to happen when EACH field is modified/changed/updated.

Thanx,
CJ

0
 
jriver12Author Commented:
Up Early.?

I'll send you the breakdown.
0
 
cheekycjCommented:
I am on EST so it wasn't really early :-)

This form calculations are quite the chore :-)

Ok, so I can follow this correctly.  Can you from a User looking at the UI perspective, tell me what they will fill out and what the result should be with what they enter.

i.e.
Contract Date is the first field.  When a user changes that what is supposed to happen.

CJ
0
 
jriver12Author Commented:
gotcha.
0
 
jriver12Author Commented:
here it comes
0
 
cheekycjCommented:
I haven't forgotten this but I am running into major issue-  besides the obvious lack of time :-)  Without real data to use, I am not sure what is going on.  I have gotten the JS errors to go away but can't tell if values change b/c they currently contain DB values that I don't have access to.

CJ
0
 
jriver12Author Commented:
I'll send you the table if I can or at least some data from it.

would that help.?
0
 
cheekycjCommented:
sure

that should help.

CJ
0
 
jriver12Author Commented:
havent forgotten just been alil overwhelmed,

ill send it first thing in the morn.
0
 
jriver12Author Commented:
cj,
its been a while, have you had any luck?
0
 
jriver12Author Commented:
everyone need a vacation. hope it was fun and relaxing.
do you want to work on it some more or would you prefer me closing the question.

I know its frustrating, like I said I'd been working on it for a while myself thats why I am in no rush.
0
 
jriver12Author Commented:
cj
did you get  the file I sent you with some of the data.
0
 
jriver12Author Commented:
cj thanks for the time I think coboldinosour has a possible solution to this prob in the javascript are.

as always thanks for your time.
0
 
cheekycjCommented:
you should have deleted this question.. no need to award pts for no solution.

CJ
0
 
cheekycjCommented:
could you post a link to the solution.. I am very interested in seeing what Cd& did.

CJ
0
 
jriver12Author Commented:
Surely,
http://www.experts-exchange.com/Web/Web_Languages/JavaScript/Q_20340523.html

points are always awarded even if no solution has been posted,
your time is valuable and so is your assistance.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.