ren_bsi
13th December 2017, 11:33
Dear Gurus,

I'm trying to add sequence number for each line of the record in standard report whinh341212100-Goods received notes by order. for example :


Seq No.|Item Code| Qty
-------------------------------------------------
1 |Item A | 50
2 |Item B | 60
3 |Item C | 70

I have done the following in the report script :


declaration:
extern domain tcmcs.long seq.no

before.program:
seq.no = 1

detail.10:
before.layout:
seq.no = seq.no + 1



but it doesn't work for me.
Kindly need your advice.
Many thanks in advance.

Best regards,
Rendy

mark_h
13th December 2017, 23:51
And you compiled the report? Did you try compiling it in debug to make sure you are running the correct report? Also make sure seq.no is not in the list of input fields for the report.

ren_bsi
14th December 2017, 04:27
Dear Mark,

It works after removing the seq.no from the input fields.
Could you please kindly explain me why seq.no should not be in the input fields list ? :D
Many thanks for your kind help :)

Best regards,
Rendy

bhushanchanda
14th December 2017, 08:41
Hi Rendy,

Consider Baan/LN to be semi object oriented.

If you declare it in your report script it will have one instance of seq.no and if you add it to report input fields it will have another instance of seq.no.

Never do it at both places, either keep it on your report input fields or declare it in your report script.

ren_bsi
14th December 2017, 11:32
Dear Bhushan,

Thanks a lot for your kind explanation :)

Best regards,
Rendy