?
Solved

Incremental Counter - Odd and Even

Posted on 2015-01-27
2
Medium Priority
?
159 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 101

Accepted Solution

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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. …
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…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …

807 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