Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Count nr of lines in text_field and add CR

Status
Not open for further replies.

avasten

Programmer
May 4, 2003
7
NL
I want to do the following in an Access Report:
Count the number of lines in a text-field (the text-field is in a page footer) and then, when it exceeds a specified number I want to go on to a new page.
Is this possible?

Thanks very much, Annet
 
Is this text field free-form with text wrapping or are there already CRs included? Are you looking for part of the footer to be on one page, and if too long, to finish in the footer of the next page (and next page if necessary)?

Jim DeGeorge [wavey]
 
Hello Jim,
I think the text field already contains CR characters (I used 'shift-CR' when I filled in the field in an Access-form), but because this (report)field is smaller then it was in the access-form a part of the text is wrapped.
What I like most is the text (in de footer) to be on 1 page.
But if the text is 2 or 3 lines longer I want the whole footer to be on the next page.
If the text is longer than that, I want a part of the footer on page one and the rest on page 2 of the report.

What I am trying to do is the following: I want to make a report that children get in school. So, the first part (on top of the page) is a logo of school, name of the child, date of the report etc.
Second part is a 2-column part wich contains the results of the subjects
And the third (and last) part are the remarks of the teacher. I want these remarks to use the total width of the page and the only solution I know is by putting this on the page-footer.
What I get now is that if the remarks are to long, they just stop at the end of the page.
That is why I thought that maybe, if I can count the lines, I can insert a page-end between the text.

Thanks in advance for looking at my problem,
Annet van Asten
 
Why not just put the teacher comment field after the grade fields?

Jim DeGeorge [wavey]
 
Hello Jim,
That is not possible because the remarks are not just about the grades but about the total behaviour of the children. I'm not sure how your reports at school are but here (in Holland) they look something like this:

name : XXXXX
date : xxxx
class : xxx

reading 8 subject x 8
writing 7 subject y 7
.........
........
.......
......
......
......
......

Remarks:
Blablablabla........Blablablabla........Blablablabla........Blablablabla........
Blablablabla........Blablablabla........Blablablabla........Blablablabla........
Blablablabla........Blablablabla........Blablablabla........
Blablablabla........

Thanks for reacting so fast,
Annet
 
Put the classes/grades in a column format in the report. Sounds like you already have that part done. For the comments, you can include that as a sub-report linked to the student ID, Place the sub-report after the grades. This should work.

Jim DeGeorge [wavey]
 
Hello Jim,
That is exactly what I did. The problem is that the page-format is set to 2 columns, and so the subreports both are in 2-column format.
That is the reason why I put the subreport (with the remarks) in the page footer.
Problem then is that the text is cut off at the end of the page and does not continue on the next page.

As far as I can see it is not possible to format 1 subreport in 2-columns and another sub-report (on the same page) to one column.
Do you have a solution ??
Thanks,
Annet van Asten
 
Try putting the sub-report in the detail section just below your columns. Don't put it in the page footer.

Jim DeGeorge [wavey]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top