• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 233
  • Last Modified:

crystal report

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
hotbc
Asked:
hotbc
1 Solution
 
VoodoomanCommented:
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

Your formula counts the records and every 25 shows the header

Use this

remainder(RecordNumber,25)>0


This absoulutely works


Good Luck


Voodoman!

0
 
AshokKumarCommented:
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
 
hotbcAuthor Commented:
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
darinwCommented:
Community Support has reduced points from 50 to 25
0
 
darinwCommented:
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
 
hotbcAuthor Commented:
thanks a lot. Sorry, i for long respons. Thanks
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now