johnmark
14th May 2013, 13:52
Hi All,
In my system there is one customized report which displays Sales Invoice details. In that report I want to display customer order on every line of invoice line. I have added cisli245.corn in report input fields. But at the time of displaying, it shows next row record, e.g. for line number 40 there is different customer order number, but in report it displays that customer order number in line number 30. So give me any solution..
Thanks,
john
mark_h
14th May 2013, 15:38
Where is the table field being filled(cisli245.corn) - in the session script or in the report script? You might need to attach the relevant code so that others might be able to see what is going on.
johnmark
14th May 2013, 17:50
Hi,
Thanks for your reply. In report layout Detail.4 it shows that line layout.
In report script, I have not added that field. In which place i want to add that field in report script? I have attached report script with this issue. Please help me.
detail.4:
before.layout:
|* In the discount column either the discount percentage or
|* discount amount is printed. Formatting this field is done here.
if r.disc.perct.arr(1) <> 0 then
|* Print discount percentage according format
r.discount = sprintf$("%@" & discount.format & "@",
r.disc.perct.arr(1))
| r.discount = shiftr$(r.discount)
r.discount = shiftr$(r.discount) & " %"
else
|* No discount percentage defined. Hence print discount amount
|* according format. This is only applicable for sales invoices.
if r.invoice.origin = 4 then
r.discount =
sprintf$(amount.format & "," & r.ih.ccur,
r.disc.amount.arr(1))
r.discount = shiftr$(r.discount)
endif
endif
| message(r.item.str)
| get.hsn.number()
if export.order() then
exempt.tax = true
exm.price = exch.cur.rate * r.price
|tot.amount = r.amount
exm.amount = exch.cur.rate * r.amount
else
exempt.tax = FALSE
endif
| if lattr.lineno > 40 then
| page()
| endif
after.layout:
r.transport.amount = r.transport.amount + r.amount
r.tot.amount = r.tot.amount + r.amount
| if first then
get.tax.code()
first = false
| endif
detail.5:
before.layout:
extern domain tcitem temp.line.item
temp.line.item = r.item.str(1;47)
| select tcibd943.hcod
select tcibd943.hcod, tcibd943.desc
from tcibd943
where tcibd943.item = {:temp.line.item}
selectdo
endselect
| select tcibd001.csel, seak
select tcibd001.csel, seak,tcibd001.txta
from tcibd001
where tcibd001._index1 = {:temp.line.item}
selectempty
tcibd001.txta = 0
endselect
select tcmcs022.dsca
from tcmcs022
where tcmcs022._index1 = {:tcibd001.csel}
endselect
select tdsls401.txta
from tdsls401
where tdsls401._index1 = {:r.order.nr, :r.order.line}
endselect
bdittmar
14th May 2013, 18:16
Hi All,
In my system there is one customized report which displays Sales Invoice details. In that report I want to display customer order on every line of invoice line. I have added cisli245.corn in report input fields. But at the time of displaying, it shows next row record, e.g. for line number 40 there is different customer order number, but in report it displays that customer order number in line number 30. So give me any solution..
Thanks,
john
Hello,
corn and corp are at line level in cisli245, so it should appear at the right record.
Do you use a variable, not resetted ?
What Mark means, is the select in sessionscript done with "select cisli245.* ......." or with specific fields ?
Regards
mark_h
14th May 2013, 19:43
See bernd answer first. Not sure I can help since I am not familiar with the session or the report. I can only assist with general type questions and answers. So if this field is passed to the report then you would need the session script to look at and maybe solve your problem. I do not know what the session script does or sends to the report. Next - if detail 4 is where you need the correct information, then the before layout is where you need to put a select to get the approriate data. Again I am not familiar with this table, report or session. Typically when I need to add something like this I add in a select in the report script since we do not own source code. Then I just make sure the correct field is used on the layout - of course sometimes I use aliases and such for the select statements just to make sure it does not interfer with the session script or anywhere else in the report script.
andreas.toepper
15th May 2013, 09:46
Getting additional data on the invoice report is somewhat tricky. My advice is don't use table-fields without reading the table in the before.display-section of your layout.
Infor changed the invoice-report from FP3 to FP5. They didn't just change the report name from cisli220011000 to cisli120011000, they changed the printing DLL too (from cislidll2200 to cislidll1200) and the layout-structure of the report itself.
With cislidll1200 they introduced new report variables used in the report (you don't find table field in the input-fields of the invoice report).
This will come handy when switching to FP8. With FP8 the old cisli-Tables (like cisli245) won't be used anymore...
I recommend checking cislidll1200 first if you need to add additional information on the report. There may be some variables present, but not used in the input-fields.
In our FP6 version of cislidll1200 there are two variables present:
r.customer.ord.nr = i.customer.order.number
r.cust.ord.nr.ln = i.customer.order.number.line |#1129414.n
So I think you should test r.cust.ord.nr.ln in your report. You may need to install solution 1129414 in addition to be able to use the variable in the report.
I checked the FP8 version of cislidll1200 too. Infor changed the variable names, so (just in case) here they are for FP8:
| extern domain tcmcs.str30m r.customer.ord.nr |#1371107.o
| extern domain tcmcs.str30m r.cust.ord.nr.ln |#1371107.o
extern domain tccorn r.h.cust.ord |#1371107.sn
extern domain tccorn r.d.cust.ord
extern domain tcmcs.st16m r.d.cust.ord.line
extern domain tcmcs.st11m r.d.cust.ord.seq |#1371107.en