Link to home
Start Free TrialLog in
Avatar of jriver12
jriver12

asked on

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: https://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=coldfusion&qid=20293490

Nathans help:https://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
Avatar of cheekycj
cheekycj
Flag of United States of America image

looks good, do you need help modifying it to something different?

CJ
Avatar of jriver12
jriver12

ASKER

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
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
I think nathans out of town or something, since he hasnt responded to the thread.

so, ya want these miserable 50pts.
lets hold out for nathans.. he should be along shortly.
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.
really?  That is strange.. I thought you could post 0 pt questions.. maybe its recent change.

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

oh well.
you can just delete this question :-)
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.
sure... send it my way:

cheekycj@yahoo.com

CJ
thanks cj.
Sorry I am here what is up.
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.
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.
any luck cj?
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
I was just checking if there  was still intrest.

no rush, take your time.
thanks
Any luck? :^)
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

Up Early.?

I'll send you the breakdown.
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
gotcha.
here it comes
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
I'll send you the table if I can or at least some data from it.

would that help.?
sure

that should help.

CJ
havent forgotten just been alil overwhelmed,

ill send it first thing in the morn.
cj,
its been a while, have you had any luck?
ASKER CERTIFIED SOLUTION
Avatar of cheekycj
cheekycj
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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.
cj
did you get  the file I sent you with some of the data.
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.
you should have deleted this question.. no need to award pts for no solution.

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

CJ
Surely,
https://www.experts-exchange.com/questions/20340523/rajeev1972-are-you-still-around-have-a-date-challenge-for-you.html

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