pmontavon
10th September 2002, 16:47
I have a requirement to print many details on a report.
The details are in different sections !

Example of the layout :

Item : XXXXXXXXX (from tiitm001), before.field.tiitm001.item


Detail from table timrp010. Detail.1

item Date Quantity
XXXX DDD 999999
XXXX DDD 999999
XXXX DDD 999999

Detail from table tdpur045. Detail.2

item Project order pos.
XXXX XXXXX 9999 99
XXXX XXXXX 9999 99
XXXX XXXXX 9999 99


Does anyone have any idea to develop this session ?
Thanks in advance
Pascal

günther
10th September 2002, 17:25
hi pascal,

in your session you should add a variable like

extern domain tcmcs.long kind.of.data


Your session might now consist of two or three (or even more) select-loops that send data to the report. All you have to do here is to set kind.of.data before sending, e.g.

kind.of.data = 1
select *
from timrp010
where ...
selectdo
...
rprt_send()
endselect

kind.of.data = 2
select *
from tdpur045
where ...
selectdo
...
rprt_send()
endselect


In your report, you should add kind.of.data as input field, (pre-)sorted, order 2 (item is your first). The rest is normal before-group / after-group handling for the sub-headers before the detail lines; the detail lines should be made dependent of the value of kind.of.data.

Günther

pmontavon
11th September 2002, 08:16
Hi Günther,

Thanks for your help. I have tested and the result is ok
Kind regards
Pascal