Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Crystal Reports

Posted on 2000-02-26
9
Medium Priority
?
213 Views
Last Modified: 2010-05-02
I am using Crystal Reports 7 and VB 6

I want to put a line number (in rows) on my report.  I can use the Record Number function but when my report involves GROUPING, using the record Number does not make sense since it will have a contineous line numbering.

I expect line numbers to start again from 1 when a new group of records is printed.  How to go about this?

0
Comment
Question by:rcbarot
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
9 Comments
 
LVL 18

Expert Comment

by:mdougan
ID: 2561081
I would do this by creating a couple of formula fields, one for doing the counting, one for doing the display, maybe even one to reset the counter.  Here is how it works, create a formula field and put it in the group header, and mark it surpressed so that it does not show, call it ClearCount, it will look like this:

@ClearCount
WhilePrintingRecords;
NumberVar GroupTotal;
GroupTotal = 0;

This formula is on the detail line, surpressed.  It keeps a running total for the group, and for the report:
@AddTotals
WhilePrintingRecords;
NumberVar GroupTotal;
NumberVar GrandTotal;
GroupTotal := GroupTotal + 1;
GrandTotal := GrandTotal + 1;

In the Group Footer, the following formula displays the subtotal (it is not surpressed):

@DisplayGroupTotal
WhilePrintingRecords;
NumberVar GroupTotal;
GroupTotal

In the Report Footer, the following formula displays the Grand Total (not surpressed):
@DisplayGrandTotal
WhilePrintingRecords;
NumberVar GrandTotal;
GrandTotal
0
 

Author Comment

by:rcbarot
ID: 2562358
Thanks a lot.  I tried your suggestion with minor modifications and it worked.

Thanks!
0
 

Author Comment

by:rcbarot
ID: 2562359
mdougan has given me his suggestion and it worked.
0
Technology Partners: 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!

 

Author Comment

by:rcbarot
ID: 2562360
This question has a deletion request Pending
0
 

Author Comment

by:rcbarot
ID: 2562361
As I have written above.
0
 
LVL 18

Accepted Solution

by:
mdougan earned 800 total points
ID: 2562528
This question no longer is pending deletion
0
 
LVL 18

Expert Comment

by:mdougan
ID: 2562529
Hi, If my answer has solved your problem, then you need to Accept it, not delete it, otherwise your points wont be given.
0
 

Author Comment

by:rcbarot
ID: 2564784
Oh I am sorry.  I really don't understand how it works.  I thought comments are just comments.  Anyway, I am giving you the points.  Thanks again.
0
 
LVL 18

Expert Comment

by:mdougan
ID: 2567528
Oh, no problem, thanks.  Yes, the etiquette here is that people should really just comment until you respond that a particular comment has solved your problem (or if a comment is leading you in the right direction, then you can post follow-up comments and have a dialog with the person or persons helping you).  Once you have a solution, you can accept one of the comments as an answer.  

If people are certain that they know the answer, then they might "answer" your question, but that has the effect of "locking" it, which moves it to an area where other experts might not bother to look at it, which means your question get less attention.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question