Solved

Crystal Reports

Posted on 2000-02-26
9
163 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
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…
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…

743 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

13 Experts available now in Live!

Get 1:1 Help Now