Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login




Remember Me
Forgot Password?
Join Us!

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.
Jobs from Indeed

Link To This Forum!

Partner Button
Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

kaeserea (Programmer) (OP)
29 Apr 03 7:50
Hello!

I compute a field in my report where I use an if statement to say: use the given formular if any of the formular elements are not equal to zero. If not print zero.

What happens is that in the "print zero" case I receive a ,0 in my report instead of a simple 0. This might be due to the fact that the format of the computed field is D12.1. How can I achiev a simple 0?

Eva
Siddhamalli (MIS)
29 Apr 03 9:26
Hey did you try using edit on that zero or may be do a decode and if its ,0 then display a field which is integer 0.

exampple


decode (formular,<> 0 ,0,= 0,formular)

see if this thing works , may be i would have understood ur ? wrong.
Thank you.

Ganesh
focwizard (Vendor)
29 Apr 03 16:34
You can also define the field with the 'S' edit option, for zero suppress (D12.2S).
kaeserea (Programmer) (OP)
30 Apr 03 2:01
Hello Ganesh,

Can you tell me something about your code line? I have never seen that before.

Hi focwizard,

I'd like to display the zero. The S option prints nothing if the value is zero.

Eva
PeterG5 (Programmer)
30 Apr 03 4:33
The field type determines the output display, so a D12.1 will show .0 by default. Try using a D12, a P12 or an integer field (I5 etc). These all show a single zero but some may not be suitable for calculations involving decimal places, as P format will round up and I format will truncate.
Siddhamalli (MIS)
30 Apr 03 10:18
Hi Eva are you asking abt Decode , think you can easily do a decode for that .
kaeserea (Programmer) (OP)
30 Apr 03 12:58
Hi Peter,

the problem is that I need the D12.1 format for all fields which are not equal to zero.

Hi Ganesh,

can you explain me with an example how you mean the DECODE in your first answer?

Thanx!
Eva

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close