cancel
Showing results for 
Search instead for 
Did you mean: 

[HELP]Crystal Report

Former Member
0 Kudos

Another question regarding in OPCH table. There was a LicTradNum field, I want to divide this filed into 4 part.

LicTradNum contain:

eg : 123-456-789-012

I want to divide it into 4 part

eg :

123 (1st part)

456 (2nd part)

789 (3rd part)

012 (4th part)

It is possible? Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

former_member541807
Active Contributor
0 Kudos

hi,

try this

make a Formula with the ff name.

Formula name: 1

Left ({OPCH.LicTradNum},3 )

Formula name: 2

Mid ({OPCH.LicTradNum}, 5,3 )

Formula name: 3

Mid ({OPCH.LicTradNum}, 9,3 )

Formula name: 4

Mid ({OPCH.LicTradNum}, 13,3 )

then inset a text object and manually add the ff. formula like this

{@1}
{@2}
{@3}
{@4}

regards,

Fidel

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi

if the format is fixed you can try this:

make a formula field and place it on your report

stringVar array Size := Split({OPCH.LicTradNum},"-");

Size[1]+ CHRW(13)+ Size[2] + CHRW(13)+ Size[3] + CHRW(13)+ Size[4];

Regards

Edited by: Pari Minhas on Dec 2, 2011 3:33 AM