Home > Archive > Visual Basic Crystal Reports > March 2006 > insert "0" character
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
insert "0" character
|
|
|
| the table got some code " 1","11000" ,"23"
now, I want to make "1" become "10000" ,"23000" and display in the report
How can I do that ?
thanks
| |
| Briscobar 2006-03-23, 7:08 pm |
| Agnes <agnes@dynamictech.com.hk> rambled:
>
> the table got some code " 1","11000" ,"23"
> now, I want to make "1" become "10000" ,"23000" and display in the
> report How can I do that ?
> thanks
Create a some formulas, and display them on the report, not the fields which
hold your data.
For the field that contains "1":
{Table.Field1} * 10000
That's it. Do the same for the field that contains "23", only multiply it by
1000, not 10000.
--
KB
MCNGP #26
Download full moviez, war3z, crackz, muzik, and pr0n at www.mcngp.com!
Or don't.
| |
| Rob Diamant 2006-03-23, 7:08 pm |
| if the field is numeric try left(cstr({field},'0') & '0000',5)
if it is text try left({field} & '0000', 5)
Rob
"Agnes" <agnes@dynamictech.com.hk> wrote in message
news:ueVqGIkTGHA.4792@TK2MSFTNGP14.phx.gbl...
> the table got some code " 1","11000" ,"23"
> now, I want to make "1" become "10000" ,"23000" and display in the report
> How can I do that ?
> thanks
>
>
| |
| Scoops 2006-03-23, 7:08 pm |
| Hi Agnes
Try this:
Add a new formula and enter this in the workshop:
select length(totext({myTable.myField}))
case 1 : {myTable.myField} * 10000
case 2 : {myTable.myField} * 1000
case 3 : {myTable.myField} * 100
case 4 : {myTable.myField} * 10
default : {myTable.myField}
Place the formula into your report instead of {myTable.myField}
Regards
Steve
|
|
|
|
|