Author |
Message |
Kitty1
Senior Member
Joined: 14 Apr 2010
Online Status: Offline
Posts: 159
|
Topic: 2 questions Posted: 01 Apr 2016 at 4:49am |
Hi, I am trying to write a quick report and i am having problems with 2 things.
First of all, If i want to print a different value depending on a field, how would i do that? for example if trans_type = 18 then i want it to print a D. If trans_type= 31 then i want it to print a V
I know i have done this before, but can't seem to remember how i did it..
the formula i have only prints the type V and i can't figure out why.
this is what i have for formula:
IF {V_GL_DETAIL.TRAN_TYPE}='18' THEN "D"; IF {V_GL_DETAIL.TRAN_TYPE}='31' then "V"
the other issue i'm having is i have a numeric field and they want it to print like this: $3463.00 should print as 346300 no commas, decimal positions. i have tried formatting with no luck.
|
IP Logged |
|
Valert16
Groupie
Joined: 21 Mar 2016
Location: Spain
Online Status: Offline
Posts: 57
|
Posted: 01 Apr 2016 at 5:18am |
First: Try This
IF {V_GL_DETAIL.TRAN_TYPE}='18' THEN "D"
ELSE IF {V_GL_DETAIL.TRAN_TYPE}='31' then "V"
Second:
Right click numeric field --> Select Number Tab --> Uncheck Currency Symbol (if you don't want it) and Choose $-1123 as style. This will show a currency field without commas and zero decimal positions. Is this what you want?
|
IP Logged |
|
Kitty1
Senior Member
Joined: 14 Apr 2010
Online Status: Offline
Posts: 159
|
Posted: 01 Apr 2016 at 5:46am |
i have figured out the first issue... now just trying to get a number 3463.00 to 346300
|
IP Logged |
|
Kitty1
Senior Member
Joined: 14 Apr 2010
Online Status: Offline
Posts: 159
|
Posted: 01 Apr 2016 at 6:10am |
thanks, i did try that. but i need the decimal positions to show... i just need to eliminate the decimal point. so $3463.20 should be displayed as 346320 I need it this way because i need to download it into a csv file
|
IP Logged |
|
Valert16
Groupie
Joined: 21 Mar 2016
Location: Spain
Online Status: Offline
Posts: 57
|
Posted: 01 Apr 2016 at 6:48am |
I suppose your field is of currency type. To get the format you want try this:
Right click numeric field --> Common Tab --> Double click the conditional formula icon next "Display String:" , use this code
ToText(CDbl({Table.Field}), 2, "", "")
|
IP Logged |
|
kevlray
Admin Group
Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
|
Posted: 05 Apr 2016 at 4:18am |
What happened to just multiplying by 100? If you need to convert the number to currency or a number first. That should be easy.
|
IP Logged |
|
|