Solved

Row Number in Group, For Each Group Row Number must start from 1

Posted on 2011-02-23
2
1,063 Views
Last Modified: 2012-05-11
hi experts, i am using Crystal report 11,
i want to start Row Number for each group. e.g.  Cash and Credit there are two group having some data, I need  Below restult
Cash
1       ahmed ali
2       akbar ali
3       sarfraz ahmed
Credit
1      basit afzal
2      javid akram
3      Imran Khan

Note: i have written code  but my each row gives me 1  instead of 1, 2 ,3 .....
Please correct my code,  or give me other code to full fill my requirement.



In the report header
Name - DeclVars
Formula
global numbervar RecCount := 0;
""

In the group header
Name ResetCount
Formula
global numbervar RecCount;
RecCount := 0;
""

In the detail section
Name IncCount
Formula
global numbervar RecCount;
RecCount := RecCount + 1;
RecCount;        
0
Comment
Question by:mahmood66
[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
2 Comments
 
LVL 100

Accepted Solution

by:
mlmcc earned 500 total points
ID: 34967423
Crystal by default evaluates formulas as early in the process as possible.  However it only retains values for formulas in the Printing pass.  To forcec a formula to be evaluated in a particular pass you can add an evaluation time command to the formula

Add WhilePrintingRecords; as the first line of each formula.

WhilePrintingRecords;
global numbervar RecCount := 0;
""

mlmcc
0
 

Author Comment

by:mahmood66
ID: 34967446
Thanx a lot for your quick support dear,
same thing i have done using running Total and reset at group(i select Group Name from list).
anywho than againt.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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.

Question has a verified solution.

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

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

737 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