Application Development 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: 

How to hide default decimals in smartforms

Former Member
0 Kudos

Hi to all,

I have developed a local invoice form. It is having different taxes like BED, CST , VAT  and TCS. Here the requirement is if any taxes is not applicable for that invoice then it should not display the description of the tax and amount in form. I have disabled the text in coding but decimals are displaying like 0.00. But client wants remove those zeros if tax is not applicable. Please suggest me way to achieve it.

Please find the screenshot below.

Thanks in advance.....!!!!!

8 REPLIES 8

pavanm592
Contributor
0 Kudos

Hi Jitendra,

You can try like this define a variable of type character in Global Definitions->Global Data tab

Ex : lv_temp type char10.

if you dont want to display 0 in print if BED is not applicable write a code before that cell and move your BED value to lv_temp and display it ,if the value is zero make lv_temp as space.

IF v_tax1 eq 0.

   lv_temp = ' '.

ELSE.

   lv_temp = v_tax1

ENDIF.


In cell text &lv_temp&,you can do this for the other tax line items also.

Regards,

Pavan

Former Member
0 Kudos

Hi Pavan,

Thank you for reply. I have tried as you suggested. But here "," and "." are missing for values.

If amount is there for that tax like CST then amount is displaying without , & . like below.

Ex : CST        12,563.00

but it is displaying like 12563.00

Please suggest me on this.

0 Kudos

Hi jitendra,

at the time of moving your amount to character field use write statement this will have the separator by default


* lv_temp = v_tax1.    "Instead of this  use write

write v_tax1 to lv_temp.

Regards,

Pavan

Former Member
0 Kudos

Hi Jitendra,

If you want to put space or 0 then do the changes as Pavan told. If you want to delete the row then put the condition inside condition tab ( v_tax1 <> 0). Then the line will not display. If yo want anything else plz update.

Thanks,

Satya

0 Kudos

Hi Hitendra,

Try passing value 0.00 to an integer variable.

Thanks!

raymond_giuseppi
Active Contributor
0 Kudos

Did you use the &field(Z)& output option?

Reference: Output Options for Field Contents in Smart Forms on line documention.

Regards,

Raymond

Chintu6august
Contributor
0 Kudos

Hi,

for removing zeros, you can put condition in the text to print only when the field is not initial.

and to remove thousand Indicator..

&FIELD(T)& >>> this suppresses thousand indicator for the field of type CURR, QUAN, DECI and INT.

field = 12,300.00

&FIELD(T)& will display 12300.00

thank you!!

sanjaybit
Explorer
0 Kudos

Dear Jitendra,

&field(I)&

Suppresses display of initial values

Pls use the above format specifier for the field to hide it if value is 0.

Thanks,

Sanjay