TheMoot
TheMoot

Reputation: 3037

In crystal reports how to number rows by letters

I would like to create an outline type numbering system in my crystal report with the following format:

  1. text

    a. text

    b. text

  2. text

    a.text

    b.text

    c. text

etc . I can generate 1,2,3 where I am using a,b c. Is there a crystal formula for converting 1 to a, 2 to b, etc or do I have to write one?

Upvotes: 4

Views: 2551

Answers (1)

dotjoe
dotjoe

Reputation: 26940

You'd use the crystal function chrw to convert int to char and an ascii table. (hint: a = 97)

chrw(96 + i) //where i is 1 based

or convert "a" to unicode with ascw and count up...

chrw(ascw("a") + (i-1)) //where i is 1 based

Upvotes: 4

Related Questions