Jump to content


Photo
- - - - -

Currency Fields


11 replies to this topic

#1 Thomas Haight

Thomas Haight

    Member

  • Members
  • PipPip
  • 14 posts
  • Gender:Male
  • Location:Freeport, United States

Posted 11 June 2004 - 12:55 PM

Does anyone know why PRO IV makes it so hard to put a right justified currency field on a report?

Seems to me this a pretty common requirement and I'm having a hell of a time doing it.

Currently I'm writing a global routine take the numeric, pic it to alpha and then right justify it.

Seems like a lot of work, but I don't know what else to do.

Can it be true that PRO IV doesn't have an easy way to do this, or is it just hard to find because of the poor documentation?

Tom

#2 Chris Mackenzie

Chris Mackenzie

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 368 posts
  • Gender:Male
  • Location:Bristol, United Kingdom

Posted 11 June 2004 - 01:28 PM

You are probably trying too hard. Pro-IV will automatically right-justify
numeric fields in a report.
The content and views expressed in this message are those
of the poster and do not represent those of any organisation.

#3 George Macken

George Macken

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 248 posts
  • Gender:Male
  • Location:Co. Wicklow, Ireland

Posted 11 June 2004 - 01:41 PM

any reports I've ever done this has not been a problem

Whats is the display code on the file in the Fld Specs @RF
Example display code on soe numeric fld's in reports that I've just reviewed are
8.2-
8,2-
&$@VNUM7 - this is a value variable with the value set as Z,ZZZ,ZZ9.99-

rather than writing logic to format fields you should be able to achieve it thru the usage of the Display Code

-----

are you sure its a pro-iv reporting problem - have you printed similar docs from other applications to the printer ? have you tried priniting to different printers ?

hth

Rgds

George

#4 Thomas Haight

Thomas Haight

    Member

  • Members
  • PipPip
  • 14 posts
  • Gender:Male
  • Location:Freeport, United States

Posted 11 June 2004 - 02:04 PM

Thanks for the reply George!

The problem is the currency symbol and making it float along with a leading negative indicator

One try at this is -$$,$$$,$$$.99, but the negative sign does not float.

Also, you can't put this in the display mask for a field that will contain 10's of millions because it's not big enough. You must create a scratch variable with the mask and put the variable name in the display mask.

However, because neither the $ nor the - will float (depending on which is first in the mask), I'm forced to convert it to alpha, strip out the spaces and right justify it.

This has nothing to do with printers, at this point I'm just displaying it in a UMSG.

My gripe is with PRO IV for not making this a no brainer. I mean this isn't some obscure case, it currency for corn sakes.

Tom

#5 Thomas Haight

Thomas Haight

    Member

  • Members
  • PipPip
  • 14 posts
  • Gender:Male
  • Location:Freeport, United States

Posted 11 June 2004 - 02:07 PM

Chris.... not with the currency symbol and +/- indicator. That's my point. I'm working on an invoice and the user wants to see the currency symbol. There is no way to have a negative currency amount with the $ and - characters floating.

#6 George Macken

George Macken

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 248 posts
  • Gender:Male
  • Location:Co. Wicklow, Ireland

Posted 11 June 2004 - 03:26 PM

Can you display the '-'sign as trailing, would this meet the requirement

see also Value Variable &$@VVMXDC

you can define your own value variables and populate them with the appropriate display masks/codes

#7 Wim Soutendijk

Wim Soutendijk

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 211 posts
  • Gender:Male
  • Location:Netherlands

Posted 12 June 2004 - 03:06 PM

I can't help you with the currency code, but I remember i used to make the sign float by changing the display mask from -ZZZZZ9.99 into : -----9.99

#8 Chris Mackenzie

Chris Mackenzie

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 368 posts
  • Gender:Male
  • Location:Bristol, United Kingdom

Posted 14 June 2004 - 08:40 AM

Why must they both float?


Fact is this: $MASK = '$,$$$,$$$,$$9.99-' works
perfectly well, the curr symbol floats and the sign is on
the right. IMO, looks neater than the sign on the left.
The content and views expressed in this message are those
of the poster and do not represent those of any organisation.

#9 Thomas Haight

Thomas Haight

    Member

  • Members
  • PipPip
  • 14 posts
  • Gender:Male
  • Location:Freeport, United States

Posted 17 June 2004 - 06:02 PM

Gee - I don't know Chris?????

Oh yeah! Becuase that's what the user wants.

#10 Chris Mackenzie

Chris Mackenzie

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 368 posts
  • Gender:Male
  • Location:Bristol, United Kingdom

Posted 18 June 2004 - 08:20 AM

oh - yeah. There is that thing about what users think they need.

So, you can only define one floating character,
for 2 you have to manually format it. And this
is giving you a hard time?
The content and views expressed in this message are those
of the poster and do not represent those of any organisation.

#11 Thomas Haight

Thomas Haight

    Member

  • Members
  • PipPip
  • 14 posts
  • Gender:Male
  • Location:Freeport, United States

Posted 21 June 2004 - 12:50 PM

Not really Chris... I wrote a global routine that accepts a number and currency format as input and returns an alpha string formated as requested... ie, currency symbol, leading sign, trailing sign, parens or the 'CR' tag. It's pretty slick actually.

My post was in refernece to having to do that. I can't beleive Pro IV doesn't make it easier than this. With VIP it's supposed to be a RAD tool and with most RAD tools you just have you indicate a report field is currency and specify a negative number format.

So... I just wanted to be sure there wasn't something I didn't know about. But it looks like there isn't.

Thanks for your interest...

Tom

#12 Kevin Bruss

Kevin Bruss

    Expert

  • Members
  • PipPipPipPip
  • 113 posts
  • Gender:Male
  • Location:Oklahoma City, OK

Posted 20 March 2006 - 08:54 PM

It may be slick, but I dare you to compare your report times..

We had a glovia function that was using Amount fields (Global for AMTPREC) and a 30 minute job
was reduced to <2 mins by using a display mask of '$$$,$$$,$$9.99-' in all of the display fields and display
fields of hdrs (replacing 11.2- and &$11.2- references)

A workaround to use the global logic you created may be to call it once to fetch the 'format' for the scratch
variable that gets used in the display fields and not use the global logic continuously in the report.

Edited by Kevin Bruss, 20 March 2006 - 08:55 PM.




Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users