Solved

Crystal Reports

Posted on 2000-02-26
9
171 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
  • 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
 

Author Comment

by:rcbarot
ID: 2562360
This question has a deletion request Pending
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

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

Accepted Solution

by:
mdougan earned 200 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

930 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now