camste
5th April 2012, 11:48
Hi everybody,
I'm having a problem with a report I'm making. There are two sessions calling this same report, but based on different items. Because of this I wanted some of the linked data to be fetched in the report instead of in the session scripts to avoid copying and pasting the code (or making a function for this small logic).
In one of my sessions I then have this (the other one is based on the rows in warehouse receipts though, so the fetching is done with a different query, but it still gives the item):
function read.main.table()
{
select tcibd001.*
from tcibd001
where tcibd001._index1 inrange {:item.f}
and {:item.t}
order by tcibd001._index1
selectdo
rprt_send()
endselect
}
Simple enough right?
In the report script:
declaration:
table ttcibd003
table ttdisa001
table ttcmcs001
table ttcibd001
extern domain cddev.str16 item.short
before.program:
item.short = "test"
Detail.1:
before.layout:
if isspace(tcibd001.item) then
item.short = "No!"
else
select tcibd003.*, tdisa001.*, tcmcs001.*
from tcibd003, tdisa001, tcmcs001
where tcibd003._index1 = {:tcibd001.item,tdisa001.cuqs}
and tdisa001._index1 = {:tcibd001.item}
and tcibd003.unit refers to tcmcs001
selectdo
item.short="Found"
selectempty
tcibd003.conv = 1
endselect
item.short = "Yes!" | tcibd001.item(10;16)
endif
I've just been trying to debug using this item.short variable, but it seems like it doesn't call my report script at all! Item.short always appears as empty in the report results, even though the item has been fetched. The description is shown. I've tried compiling the report script in debug mode, but it never enters into debug.
Report layout fields:
item.short, tcibd001.dsca, tdisa001.cwar, tdisa001.cuqs, tcibd003.conv and tcibd001.cuni
Input fields:
item.short, num.labels, tcibd001.item, tcibd001.dsca, tdisqa001.cwar, tdisa001.cuqs, tcibd003.conv and tcibd001.cuni
The report shows values for the two fields from tcibd001, but not for the other ones which should be computed.
Why isn't it called?? I've tried looking at other scripts in Baan, but it all seems similar, and it doesn't look like like there's anything missing.
I'm having a problem with a report I'm making. There are two sessions calling this same report, but based on different items. Because of this I wanted some of the linked data to be fetched in the report instead of in the session scripts to avoid copying and pasting the code (or making a function for this small logic).
In one of my sessions I then have this (the other one is based on the rows in warehouse receipts though, so the fetching is done with a different query, but it still gives the item):
function read.main.table()
{
select tcibd001.*
from tcibd001
where tcibd001._index1 inrange {:item.f}
and {:item.t}
order by tcibd001._index1
selectdo
rprt_send()
endselect
}
Simple enough right?
In the report script:
declaration:
table ttcibd003
table ttdisa001
table ttcmcs001
table ttcibd001
extern domain cddev.str16 item.short
before.program:
item.short = "test"
Detail.1:
before.layout:
if isspace(tcibd001.item) then
item.short = "No!"
else
select tcibd003.*, tdisa001.*, tcmcs001.*
from tcibd003, tdisa001, tcmcs001
where tcibd003._index1 = {:tcibd001.item,tdisa001.cuqs}
and tdisa001._index1 = {:tcibd001.item}
and tcibd003.unit refers to tcmcs001
selectdo
item.short="Found"
selectempty
tcibd003.conv = 1
endselect
item.short = "Yes!" | tcibd001.item(10;16)
endif
I've just been trying to debug using this item.short variable, but it seems like it doesn't call my report script at all! Item.short always appears as empty in the report results, even though the item has been fetched. The description is shown. I've tried compiling the report script in debug mode, but it never enters into debug.
Report layout fields:
item.short, tcibd001.dsca, tdisa001.cwar, tdisa001.cuqs, tcibd003.conv and tcibd001.cuni
Input fields:
item.short, num.labels, tcibd001.item, tcibd001.dsca, tdisqa001.cwar, tdisa001.cuqs, tcibd003.conv and tcibd001.cuni
The report shows values for the two fields from tcibd001, but not for the other ones which should be computed.
Why isn't it called?? I've tried looking at other scripts in Baan, but it all seems similar, and it doesn't look like like there's anything missing.