Hi I’m new in scriptcase and Ihave a problem that I don’t know how to solve.
I need to make a grid with a filter, in the filter I have to put one code and a range of dates and with that, I could generate the grid. So far so good until now
But I need some validations for the recordset and I don’t know how and where to put the code to do this
I have 2 tables:
tbl_institutions
cod_inst
…
…
…
tbl_movs
PK
nr_inter
Cod_inst
type
date
…
…
(there are many records with the same nr_inter and cod_inst but different date and type)
So, for example in filter cod_inst = 20 range between 2011/04/01 and 2011/04/30
In case have one record for a nr_inter that comply the two conditions
Nr_inter 1
Cod_inst 20
type 2
date 2011/04/06
days 24 (calculated field: difference between the date on recor and the last date of the range)
In case have more than one record
nr_inter 2
Cod_inst 20
type 2
date 2011/04/08
days 4 (calculated field: difference between the date on record and the date of the next record)
nr_inter 2
Cod_inst 20
type 3
date 2011/04/12
days 18 (calculated field: difference between the date on record and the last date of the range)
In case have no record that comply but the type has different to 1 and date minor of range
nr_inter 2
Cod_inst 20
type 3
date 2011/02/09
days 30 (calculated field: the total of days in the range)
So, How could I do that?
Thanks in advance.
Quatrero