Solved

Incremental Counter - Odd and Even

Posted on 2015-01-27
2
116 Views
Last Modified: 2015-01-27
Good morning,

I have a report with 4 groups, two are suppressed and the other two are visible.  Of these two groups, Let's Call them A and B - I want to see if I can do the following:

Group A - The user will enter an odd number, say 5 and then the records in group A will increase in odd values from 5; 5, 7, 9, 11 etc.

Group B - The user will enter an even number, say 6 and then the records in group B will increase in even values from 6; 6, 8, 10, 12 etc.

Does anyone have any ideas on how to do this?

Thank you in advance,
CS
0
Comment
Question by:rporter45
2 Comments
 
LVL 100

Accepted Solution

by:
mlmcc earned 500 total points
ID: 40572743
Are you trying to simply number the records in the group or is there some kind of selection process going on?

You mention 4 groups as if they are different things.  Do you mean you are grouping by say STATE for addresses  and you want California and New York numbered and you have Texas and Florida suppressed? or do you have multiple groupings like State then City?

In the former you could create 2 formulas  to do the counting using variables
In the report header add a formula
WhilePrintingRecords;
Global NumberVar OddCount := {?YourParam}) - 2;
Global NumberVar EvenCount := {?YourParam} - 1;
""

Open in new window

To display the counts
WhilePrintingRecords;
Global NumberVar OddCount ;
OddCount := OddCount + 2;
OddCOunt

Open in new window


Similarly for EvenCount
WhilePrintingRecords;
Global NumberVar EvenCount ;
EvenCount := EvenCount + 2;
EvenCount 

Open in new window


mlmcc
0
 

Author Closing Comment

by:rporter45
ID: 40573061
This is fantastic - works perfectly thank you!

CS
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

Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

867 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

22 Experts available now in Live!

Get 1:1 Help Now