billydeng
11th March 2009, 06:47
Hi guys
I am newbie for BAAN report programing I got compile error
what I want is to give the value to the input field which is tdsls040.prdt. The detail 2 can be ingored because it is standard scripts. Then I got error:
repgen: invalid transaction id 1 specified
Abnormal end
Can anyone give a idea what is going on
Thanks a lot
declaration:
domain tclang save.textlang
table ttdsls040
table ttipcs520
detail.1:
field.tdsls040.prdt:
showDelvDate()
detail.2:
before.layout:
save.textlang = lattr.textlang$
lattr.textlang$ = tcmcs046.lang
after.layout:
lattr.textlang$ = save.textlang
Function tcdate showDelvDate() |delivery date
{
tcdate delvDate
select tdsls040.prdt from tdsls040
where tdsls040.orno = :tipcs520.orno
selectdo
delvDate = tdsls040.orno
endselect
return delvDate
}
ks_ks_
11th March 2009, 08:17
Hi,
For detail.1 you have write it like this:
You nactually no need to give the field name in detail
detail.1:
before.layout:
showDelvDate()
It should work fine.
bdittmar
11th March 2009, 10:26
Hi guys
I am newbie for BAAN report programing I got compile error
what I want is to give the value to the input field which is tdsls040.prdt. The detail 2 can be ingored because it is standard scripts. Then I got error:
repgen: invalid transaction id 1 specified
Abnormal end
Can anyone give a idea what is going on
Thanks a lot
declaration:
domain tclang save.textlang
table ttdsls040
table ttipcs520
extern domain tcdate delvDate
detail.1:
field.tdsls040.prdt:
showDelvDate()
detail.2:
before.layout:
save.textlang = lattr.textlang$
lattr.textlang$ = tcmcs046.lang
after.layout:
lattr.textlang$ = save.textlang
Function tcdate showDelvDate() |delivery date
{
| tcdate delvDate
select tdsls040.prdt from tdsls040
where tdsls040.orno = :tipcs520.orno
selectdo
| delvDate = tdsls040.orno
delvDate = tdsls040.prdt |(This must be a datefield !)
endselect
return delvDate
}
Regards
Check the modifications in above script !
Regards
billydeng
11th March 2009, 21:47
Hi ks ks
I tried the suggestion you provided, and no errors after compile, thanks, but there is one area I don not quite understand is that you know on the form scripting we populate the value to the particular field like <fieldname>:expression, but in the report how can we let the input field(tdsls040.prdt) catch the showDelvDate, I mean in detail 1 there are hips of input fields and how does the tdsls040.prdt can be populated with showDelvDate without specifying some thing like tdsls040.prdt:showDelvDate
Thanks
Regards Billy
mark_h
11th March 2009, 22:04
In baan 4 if you want to populate a variable in a report script you first declare it in the report script - NOT as a input parameter to the report. So in the report script do something like extern domain for showdelvdate. Then just set showdelvdate to the right table field. Last add showdelvdate to the correct report layout. That should work if I understand what you are asking.
billydeng
11th March 2009, 22:38
Hi mark_h
Yes, you explaination is just what I want, so I figure out something like
domain tdsls040.prdt delvDate
detail.1:
before.layout:
select tdsls040.prdt from tdsls040
where tdsls040.orno = :tipcs520.orno
selectdo
tdsls040.prdt = delvDate
endselect
Thanks I am baan expert now :)