I need to create section numbering in a report, e.g the title page will be section 1 page 1; page 2 would be section 2 page 1 and so on. Is there a way of doing this using a formula or any other method.
One question before I give my code sample:<br><br>Do you always know the page that the new sections will begin on or must you look at something else in the report to determine this?<br><br>If you always know there will be 12 pages in section 1 and 20 pages in section 2 and so forth then the code for the formula will look like this:<br><br>if PageNumber in [1 to 12] then "Section 1 Page " + ToText(PageNumber)<br>else<br>if PageNumber in [13 to 33] then "Section 2 Page " + ToText(PageNumber)<br><br>We must convert the PageNumber to text so the string concatenation will work.<br><br>To make sure the PageNumber doesn't show up with decimal places, (1.00) go to File¦Options¦Fields and change the format of the number fields to show no decimals.<br><br>Now, just stick this formula in your page header.<br><br>If you must watch for other criteria to determine when the sections start then the code will have to reflect this, of course.<br><br>Hope this helps. <p>Cody ford<br><a href=mailto:codyford@yahoo.com>codyford@yahoo.com</a><br><a href= > </a><br>VB, VBS, Seagate Info/Crystal Reports<br>
Thanks Cody. Unfortunately I won't know how many pages are in each section prior to refreshing the report data. I appreciate your help, though. This tip will probably come in useful in the future, so I have it on file.
Do you know what you have to watch to determine when you go to another section? Do you watch for a keyword, database field or something else? If you know what changes from section to section I may be able to help you get the rest of the way.<br><br> <p>Cody ford<br><a href=mailto:codyford@yahoo.com>codyford@yahoo.com</a><br><a href= > </a><br>VB, VBS, Seagate Info/Crystal Reports<br>
It would be great if you could. The way the report is layed out is as follows. The table of contents is going to be section 0. This may contain 1 or 2 pages, depending on what view of the database I am reporting on. Each page here will be numbered 0.1 and 0.2. The main reports will be inserted as subreports in the report footer. They will be numbered 1.1, 1.2 and so on. So the sections break at each subreport. Does this give you any more ideas about how to fix the problem. I really appreciate your help on this, it has been sticking me for a few days now, and the boss is getting impatient. Not to worry, she can cool her heels for a while longer. It doesn't do to always let them have their way.
Yes, this helps some.<br><br>Since the subreports separate the sections this makes the code unique for each.<br><br>The subreport for section one will have a formula like this:<br>"Section 1 Page " + ToText(PageNumber)<br><br>The subreport for section two will have a formula like this:<br>"Section 2 Page " + ToText(PageNumber)<br><br>Placed in the report footer or wherever you need them...<br><br>Now, the main report, (The parent of the subreports) can have its own page number.<br><br>You may have to hide the main page number conditionally for the subreport page numbers to take over - I'm not sure. I'm building this in my head before the caffeine kicks in so forgive me for that.<br><br>Hope this gets you closer.<br> <p>Cody ford<br><a href=mailto:codyford@yahoo.com>codyford@yahoo.com</a><br><a href= > </a><br>VB, VBS, Seagate Info/Crystal Reports<br>
I have two sub reports placed on main report.
Total number of pages are 8.
First 4 pages is from 1st subreport and
Second 4 pages from 2nd subreport.
pagenumber should be displayed as
1 for 1st page of 1st subreport.
2 for 1st page of 2nd subreport.
3 for 2nd page of 1st subreport.
4 for 2nd page of 2nd subreport.
5 for 3rd page of 1st subreport.
6 for 3rd page of 2nd subreport.
7 for 4th page of 1st subreport.
8 for 4th page of 2nd subreport.
how to do the page numbers??? pls.answer me??
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.