Scripting
Is it possible to have one master band and several detail bands (all having datasources set up with the datasource of the master band as mastersource ), and then supress printing of each detail band based on some contents of the master?
I want only 1 of the detail bands to be printed for each master-record.
Say I have a field in the master datasource containing values from 1 to 5.
I want detailband1 to be printed if the value is 1, detailband2 to be printed if the values is 2 and so on...
The fields of the detailbands I want to suppress will not necessarily be empty.
I have tried som scripting in the obp on both the master band and the detail bands, but with no success. (detailband1.visible and showband-function).
I want only 1 of the detail bands to be printed for each master-record.
Say I have a field in the master datasource containing values from 1 to 5.
I want detailband1 to be printed if the value is 1, detailband2 to be printed if the values is 2 and so on...
The fields of the detailbands I want to suppress will not necessarily be empty.
I have tried som scripting in the obp on both the master band and the detail bands, but with no success. (detailband1.visible and showband-function).
Comments
Alex
work in the obp event of the masterdataband and set the visible property of the detailBands to true or false according to expression.
if [tablename."fieldname"] > value then bandname.visible := true else bandname.visible := false;
or create variables
showd1 showd2 showd3
set them to true or false according to expression in obp event of mdband.
then in the obp event of the appropriate detailband
visible := Showd1;
and so on.
regards