Solved

# crystal report

Posted on 2000-04-04
226 Views
can you tell me how to determine the number of detail that will be printed in my report before it will be print a new group header ?. Example : i want to print invoice with Crystal Report. Every 25 detail it will print a new group header.
0
Question by:hotbc

LVL 5

Accepted Solution

Voodooman earned 25 total points
ID: 2684810
Hi!

You can do this by inserting a section above the detail on every record and inserting the group header fields and then formatting the section to be suppressed using a bit of modular arithmetic

Use this

remainder(RecordNumber,25)>0

This absoulutely works

Good Luck

Voodoman!

0

Expert Comment

ID: 2686673
Here it goes friend. Insert a new formula in Details section with variable say intRecordCount. Add a new formula in Header section and in that formula give intRecordCount = 0. (Initializeing the vaiable in the formula to 0 in the header section.)

Now for each record, keep on incrementing intRecordCount by 1. Check if it is exceeded 25. If exceeded do whatever u want (either suppress the record or whatever u need to do).

This would surely work for we have worked like this. As the variable will automatically be reinitialized, everytime, the detail section will print only 25 records or less.
0

Author Comment

ID: 2687190
vodooman and ashokKumar's have a similar idea but i need more help.

in "page header", i made a formula that declare a variable, example :

numbervar myVariable := 0;

then in "detail" i made a formula again that increase myVariable by 1, example :

numbervar myVariable;
myVariable := myVariable + 1;

then i go to preview report and i can see that myVariable value always : 1.00, Can you tell me why ?

And if the problem above is solved i have to go to the format section on Group / Page Header and mark "New Page After" and click the icon on the right
and write :
numberVar myVariable;
if myVariable > 25 then true else false;

Am i right ?

0

LVL 3

Expert Comment

ID: 2748749
Community Support has reduced points from 50 to 25
0

LVL 3

Expert Comment

ID: 2748750
Hello all,

Reducing points to one half to allow for split.

You can now accept one of the comments in this thread as an answer. To award the other Expert, you can create a new question in this topic area with a title of 'For ExpertName -- 10322680' using that Experts username and assigning 25 points to it.

Remember, the Accept Comment as Answer button is in the header of the comment.

darinw
Customer Service
0

Author Comment

ID: 2765012
thanks a lot. Sorry, i for long respons. Thanks
0

## Featured Post

Question has a verified solution.

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