Solved

nathans and cj

Posted on 2002-06-06
36
235 Views
Last Modified: 2013-12-24
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
0
Comment
Question by:jriver12
  • 20
  • 14
  • 2
36 Comments
 
LVL 19

Expert Comment

by:cheekycj
ID: 7062429
looks good, do you need help modifying it to something different?

CJ
0
 

Author Comment

by:jriver12
ID: 7062589
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
 
LVL 19

Expert Comment

by:cheekycj
ID: 7062615
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
Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

 

Author Comment

by:jriver12
ID: 7062656
I think nathans out of town or something, since he hasnt responded to the thread.

so, ya want these miserable 50pts.
0
 
LVL 19

Expert Comment

by:cheekycj
ID: 7062730
lets hold out for nathans.. he should be along shortly.
0
 

Author Comment

by:jriver12
ID: 7062749
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
 
LVL 19

Expert Comment

by:cheekycj
ID: 7062933
really?  That is strange.. I thought you could post 0 pt questions.. maybe its recent change.

CJ
0
 

Author Comment

by:jriver12
ID: 7062988
yeah, I think its new my self, I tried and it told me that it had to have a value =>50.

oh well.
0
 
LVL 19

Expert Comment

by:cheekycj
ID: 7067664
you can just delete this question :-)
0
 

Author Comment

by:jriver12
ID: 7067748
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
 
LVL 19

Expert Comment

by:cheekycj
ID: 7068656
sure... send it my way:

cheekycj@yahoo.com

CJ
0
 

Author Comment

by:jriver12
ID: 7069578
thanks cj.
0
 
LVL 5

Expert Comment

by:nathans
ID: 7093551
Sorry I am here what is up.
0
 
LVL 5

Expert Comment

by:nathans
ID: 7093555
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
 

Author Comment

by:jriver12
ID: 7093594
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
 

Author Comment

by:jriver12
ID: 7103764
any luck cj?
0
 
LVL 19

Expert Comment

by:cheekycj
ID: 7121900
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
 

Author Comment

by:jriver12
ID: 7122145
I was just checking if there  was still intrest.

no rush, take your time.
thanks
0
 

Author Comment

by:jriver12
ID: 7169239
Any luck? :^)
0
 
LVL 19

Expert Comment

by:cheekycj
ID: 7169292
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
 

Author Comment

by:jriver12
ID: 7169308
Up Early.?

I'll send you the breakdown.
0
 
LVL 19

Expert Comment

by:cheekycj
ID: 7169636
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
 

Author Comment

by:jriver12
ID: 7169641
gotcha.
0
 

Author Comment

by:jriver12
ID: 7169971
here it comes
0
 
LVL 19

Expert Comment

by:cheekycj
ID: 7201495
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
 

Author Comment

by:jriver12
ID: 7201504
I'll send you the table if I can or at least some data from it.

would that help.?
0
 
LVL 19

Expert Comment

by:cheekycj
ID: 7201567
sure

that should help.

CJ
0
 

Author Comment

by:jriver12
ID: 7204587
havent forgotten just been alil overwhelmed,

ill send it first thing in the morn.
0
 

Author Comment

by:jriver12
ID: 7238784
cj,
its been a while, have you had any luck?
0
 
LVL 19

Accepted Solution

by:
cheekycj earned 200 total points
ID: 7239334
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
 

Author Comment

by:jriver12
ID: 7239391
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
 

Author Comment

by:jriver12
ID: 7239393
cj
did you get  the file I sent you with some of the data.
0
 

Author Comment

by:jriver12
ID: 7249122
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
 
LVL 19

Expert Comment

by:cheekycj
ID: 7249173
you should have deleted this question.. no need to award pts for no solution.

CJ
0
 
LVL 19

Expert Comment

by:cheekycj
ID: 7249176
could you post a link to the solution.. I am very interested in seeing what Cd& did.

CJ
0
 

Author Comment

by:jriver12
ID: 7249190
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

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

One of the typical problems I have experienced is when you have to move a web server from one hosting site to another. You normally prepare all on the new host, transfer the site, change DNS and cross your fingers hoping all will be ok on new server…
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question