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

x
?
Solved

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

Posted on 2011-02-23
2
Medium Priority
?
1,070 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 101

Accepted Solution

by:
mlmcc earned 2000 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

Tech or Treat! - Giveaway

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

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. …
I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

618 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