Solved

Crystal Reports

Posted on 2000-02-26
9
193 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
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!

 

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 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

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

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

Suggested Solutions

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
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…

730 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