Solved

# Grouping on a PageNofM count!

Posted on 2007-08-10
483 Views
I don't know if this is even possible.  But somehow I gotta do this, so any ideas at all would be helpful.

I have a statement report.  Its all of our customer's statements in 1 report .  On each statement I use the page n of m special field to count how many pages are in the statement.  It resets when a new statement comes up.  I need to create a formula that say if the statement is 1, 2 or 3 pages long then "1 - 3 pages" else if the statement is 4, 5, 6, 7, 8 or 9 pages long then "4 - 9 pages" else if the statement is 10+ pages then "10+ pages"  so thats easy  I did that.. but now I need to group on that.  I need all the 1 - 3page statements together followed by 4 - 9 page statements, followed by the 10+ page statements.  I can sort or group by this.... does not matter as long as they are all together.  Our accounting dept needs different envelopes for each of those groups for the folder stuffer machine and they cannot go through 7,000 statements every month to filter them out by hand.  PLEASE HELP!!!!!!
0
Question by:loisellec

LVL 42

Expert Comment

I don't believe this is going to be possible.  The problem is that Crystal calculates page numbers in the final pass of the report generation and the grouping and sorting has already been done at that point.  If you think about it, it makes sense - if you have group headers, how could Crystal know the number of pages until the number of group headers had been determined...

The only way you'll achieve this is if you can use some other measure than number of pages.  For example if you can assume 50 records per page and then use the number of records to determine which grouping they fall in - that might be possible.  Using Page NofM simply isn't going to work.

Sorry!

frodoman
0

Author Comment

I wish that would work... but the amount of ads on a page could vary depending on what information is being given and how much room it takes.  Some ads have only 4 lines of info and some have 10 lines of info.  The first page may have multiple lines of payments listed which take a up room.

Any other ideas?  I am at a total loss here.  Im also working with Crystal 7.
0

LVL 42

Accepted Solution

No good ideas...  As I said, page numbers is completely out so the only way it'll work is if you can somehow derive page numbers from the raw data.  I've seen similar cases where people will use a fixed width font and actually count characters to determine how many rows each record will take - if that's a possibility for you then you may be able to get something along those lines to work.  Those approaches are clumsy at best though and will more likely get you "close" than be completely accurate (for example, different printers will space differently and may change calculated pages, etc.).

Unless you can figure out a way to derive the vertical size of each statement based on the raw data, you simply won't be able to do this...
0

LVL 100

Expert Comment

Agree.  Especially with CR7 you are limited in what you can do to solve this.

mlmcc
0

Author Comment

I think i am going to try to make a formula for the seperation since that works, put it in the page header. Then suppress EVERY section of the report based on the formula.  Like if the formula says : if totalpagecount <4 then "1 - 3 pages" then I'll have them run 3 different reports where each report will suppress the other page 'groupings'  make sense?  It looks like you can suppress a section by the total page count.  I think that is the only way they will get what they need.

Thanks!!!
0

## Featured Post

Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.