Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Show zero in type i variable

Former Member
0 Likes
1,203

Hello all,

I have a requisite to show de '0.0' in a screen field of a type i variable. Is this possible or do i have to change de type of the variable?

Regards,

Pedro Bessa

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,132

It's impossible to use an integer variable to show floating point values. You might want to use TYPE p DECIMALS 1.

9 REPLIES 9
Read only

Former Member
0 Likes
1,133

It's impossible to use an integer variable to show floating point values. You might want to use TYPE p DECIMALS 1.

Read only

0 Likes
1,132

Hello Gustavo,

Variable is type p decimals 1 sorry i was wrong. The problem is when the value is 0.0, in screen field we see empty instead of 0.0.

Regards,

Read only

0 Likes
1,132

Hi Pedro,

there are some options for screen field like remove preceding zeros and field style in field properties. Try some of them, maybe it solve your problem.

Frisoni

Read only

0 Likes
1,132

Doesn't work. I guess i have to channge the variable to char...

Regards,

Read only

0 Likes
1,132

Hi ,

Declare you variable as BSIK-WRBTR it should work ...

Rgs,

suneel G

Read only

0 Likes
1,132

Hi ,

Declare variable type as WRBTR.

It should work.

Regards,

vijay

Read only

0 Likes
1,132

The output style of the screen field is disable. How can i enable it?

Read only

Former Member
0 Likes
1,132

Hey Pedro,

Output style depends on the screen field declaration. So if you are using a database table field in the declaration, the output style will correspond to that particular field's style.

So I would suggest you find a DB field whose domain is similar to "TYPE p DECIMALS 1". This will solve the output style problem.

Hope this helps!!

Cheers,

Shailesh.

Read only

0 Likes
1,132

Thanks all,

Messed up with the program, changed the variable to char,

Poorly resolved

Regards