on 08-17-2011 8:57 AM
Hi Experts,
I am fetching the Quantity field and displaying through ADOBE FORM, if the Quantity is 0 (ZERO) I have to display BLANK space in the respective CELL of ADOBE, if it is other than 0, I have to print the same value to that CELL.
I have tried many ways to achieve this, still its not resolved. please help me out from this.
Regards
valluru
If it is a print form, just use FormCalc.
You go to your text field, where you want to display the quantity.
Choose:
event: initialize
language: FormCalc
run at: Server
Add the following code:
if ($ == "0")
then $ = ""
endif
And you are done.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Experts,
Thanks for the solutions and response.
to achieve OMITTING ZEROS in ADOBE output I have done scripting.
Please write the following code for the field which you don't want to display the Zero's.
In LAYOUT choose the Language as JavaScript for that particular field also change the field type (Cell type) as TEXT FIELD.
if(this.rawValue == "0");
{
this.rawValue = " ";
}
Edited by: vallurukishore on Aug 22, 2011 8:11 AM
Edited by: vallurukishore on Aug 22, 2011 11:32 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kishore,
I have written the same peice of code which you have written in javascript in initialose event.
Can you please help me out. I have been trying for this for long time.
I have written the below logic on the partcular field. Written in Intialise event and also changed the field type to text field.
if ( this.rawValue == "0");
{
this.rawValue = " ";
}
Thanks and Regads,
Karthik Ganti.
This message was moderated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
data: lv_quan type decimals,
lv_string type string.
if the field is defined as quantity it will display "0.00"
try defining the field in string, when it is ZERO, clear the field...it will show a space.
else.
move lv_quan to lv_string
lv_string is now an attribute in ADOBE.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kishore,
I haven't worked on Adobe forms but I would like to give you a hint like:
if you have condtions node or similiar to it use:
data quantity1 type text.
if quantity = 0.
quantity1 = space.
endif.
Or
you can retrict it in the slect query it self like:
select f1 f2 quantity
into table itab
from tab
where quantity NE '0'.
Hope this helps.
BR
Dep
Edited by: DeepakNandikanti on Aug 17, 2011 10:35 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Experts thanks for your thoughts,
@ Deepak,
Thanks for the replay, along with the Quantity I am fetching some other fields, and I am passing those values to ADOBE.
If I use the above select query, I can't able to pick the remaining fields values.
Any how We can achieve this through CODE, but for Omitting Zero's some feature/setting is there in ADOBE FORM level itself.
Even I have changed at ADOBE FORM level, like I choosed text field/Numeric field and I have chossed Integer and allow blank space options. I have tried max combinations what I know to restrict Zero's. still it is coming.
I had similar requirement where Amount field of form needed to print as space in case of 0.00 value. Below javascript code in initialize event worked properly for me. in my case form field GV_TOT_DED is bind to interface field GV_TOT_DED which is of type QBSHB. I did not change anything in pattern. On Form, type of field GV_TOT_DED is decimal field and no need to make it as text field.
Simply add this code.
var totded = xfa.resolveNode("data.SP_Page1.SP_Invoice_Items.SP_Footer.GV_TOT_DED").rawValue;
if(totded == "0.00")
{
xfa.resolveNode("data.SP_Page1.SP_Invoice_Items.SP_Footer.GV_TOT_DED").rawValue = "";
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.