pralash
22nd November 2017, 14:35
Hi,

I'm new for LN Programming... I have created an array which has different values.... I want to send the contents of array to the report... Here the number of elements of array may be varied for each and every time... So after adding this array variable for example "count" into the report input filed, how can I add this variable in the relevant layout....

Note : If the variable is a ordinary one, we can easily add it in the relevant form editor. But my variable is an array and also which holds different values(sometimes 10 values,20 and so on). So how can I add this array variable in the layout...?

Please let me know if some one has the idea about it...
Thanks in advance,
Regards,
Pralash

mark_h
22nd November 2017, 14:51
You can put in a separate layout for the variable and then use layout.again. So you can search on it.
Sample code - in our case the after.field.tipgc500.item is printing warehouse(1,cnt). So basically it prints the item - then each warehouse the item is located in.

declaration:
extern long cnt

| after.prt.cwar.1:
| before.layout:
| lattr.pageno = 0
detail.1:
before.layout:
cnt = 1

after.tipgc500.item.2:
after.layout:
if cnt+1<=num.warehouses then
cnt = cnt + 1
layout.again()
endif

pralash
23rd November 2017, 08:00
Thanks for your guidance.... Similarly how can I count the number values stored in an array... Is there any predefined functions are available for counting the number of values those are stored in a particular array?
If so, please let me know about that function...
Thanks,
Pralash