Skip to Content
author's profile photo Former Member
Former Member

How to hide default decimals in smartforms

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.....!!!!!

Screenshot.PNG (12.3 kB)
Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

6 Answers

  • Posted on Aug 19, 2016 at 12:52 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 19, 2016 at 01:00 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 19, 2016 at 01:10 PM

    Hi Hitendra,

    Try passing value 0.00 to an integer variable.

    Thanks!

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 19, 2016 at 01:19 PM

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

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

    Regards,

    Raymond

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 20, 2016 at 04:41 PM

    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!!

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 20, 2016 at 07:43 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.