modify expression of computed field in the detail band

modify expression of computed field in the detail band

Post by Xaver Trap » Sat, 22 Mar 2008 18:37:39


How can I modify the expression of a computed field
in the detail band of a datawindow?

dw_plan.object.cli.expression = "'ABC'"
works but I would like to have a different
expressions for each row ...

Xaver
 
 
 

modify expression of computed field in the detail band

Post by RT » Fri, 04 Apr 2008 19:23:19

You cant change expression of a computed object row wise (as in the
case of columns)

To go around with this problem
1 .to the existing select list add a non existing column
Select ................, 1000 AS 'comp_1' from tab1
2.in the script
for i = 1 to dw_1.rowcount ()
dw_1.object.comp_1 [i] = dw_1.object.unitprice [i] * 2
next
( where unitprice of the current row * 2 is the expression)

3. if u r very specific on row number
add if statements to create new expression based on row numbers
like
if i=123 then dw_1.object.comp_1 [i] = dw_1.object.unitprice [i] *
2.51