cancel
Showing results for 
Search instead for 
Did you mean: 

Running total as alphabets

Former Member
0 Kudos

I want to put a running total as alphabets.

For Example

1. Question Title

     A) Option 1

     B) Option 2

     C) Option 3

2. Question Title

     A) Option 1

     B) Option 2

     C) Option 3

I got the running numbers for Question Title but i am not getting the A,B,... for Answers.

Have anyone done similar with Crystal Reports Running Total or any other different way?

Accepted Solutions (1)

Accepted Solutions (1)

DellSC
Active Contributor
0 Kudos

Is there a particular reason why you're using running totals instead of summaries?

Try this:

1.  Group by Title.

2.. Group by Option.

3.  Create a summary at the Option level that will count/sum whatever you need.

4.  Create a summary at the Title level that will count/sum whatever you need.

If you need to continue to use the running totals, you'll need to create a second one to do the running total by option - have it reset on change of the option group.

-Dell

Former Member
0 Kudos

Hello Dell,

Thanks for your reply.

I exactly done the same. It's a summary but i have created it in Running Total Fields Section.

Anyway, As long as it's fine for Number but i want it to repeat it in alphabet. I mean A,B,C,... instead of 1,2,3,...

Hope you got my point.

Thanks

DellSC
Active Contributor
0 Kudos

Ok, you would use your running total in a formula, something like this (assuming the running total is called "{#OptionCount}":

Switch(

  {#OptionCount} = 1, "A",

  {#OptionCount} = 2, "B",

  ...<other option numbers>...

  true, "Unknown")

The "Switch" formula is like a "Case" statement.  It contains pairs of statements - the first statement in the pair must return either true or false and the second is the value that you want when the first statement is true.  The final "true" is the default value in case none of the other statements are true.

-Dell

0 Kudos

Moved to Report Design forum.

abhilash_kumar
Active Contributor
0 Kudos

Hi Dharmesh,

Try this:

1) Group by Title

2) Create this formula and place it on the Group Header:

WhilePrintingRecords;

numbervar i := 64;

3) Create another formula and place this on the Details Section:

WhilePrintingRecords;

numbervar i;

i := i + 1;

if i <= 90 then

chrw(i);

-Abhilash

Former Member
0 Kudos

Hi Dell,

Thanks for your help.

When i am using this It's giving me error "A running total cannot refer to a print time formula Details:#RTotal1"

Former Member
0 Kudos

Hi Abhilash,

Thank you for your reply.

This solved my problem. It's working as i expected with your solution.

Thanks a lot

Answers (0)