pegaga1979
14th February 2014, 09:33
Hi,

I would like replace printed data with my data. but it printed nothing.
it is as below:

declaration:


before.program:




detail.1:
before.layout:
if hcsls901.mcod = "6424G3" then
model = "POLO 251"
else if hcsls901.mcod = "6414G3" then
model = "POLO 250"
else if hcsls901.mcod = "AY23Q5" then
model = "JETTA"
endif
endif
endif

bhushanchanda
14th February 2014, 09:36
Hi,

Check if hcsls901.mcod and model fields are added in report input field.

pegaga1979
14th February 2014, 10:13
I hv already added at input fields and for hcsls901.mcod is printed but not model.

bhushanchanda
14th February 2014, 10:17
Hi,

Check the length of the field.

If hcsls901.mcod has length more than 6 characters then you can try:-

hcsls901.mcod(1;6) = "6424G3"

Considering, its not a segmented domain.

I ll suggest you to put your report under debugger and check if the if conditions are ever went true.

pegaga1979
14th February 2014, 10:24
Hi Bhushan,

it's work now.
tq so much :)

bdittmar
14th February 2014, 10:27
Hi,

I would like replace printed data with my data. but it printed nothing.
it is as below:

declaration:


Domain xyz model

before.program:




detail.1:
before.layout:
if hcsls901.mcod = "6424G3" then
model = "POLO 251"
else if hcsls901.mcod = "6414G3" then
model = "POLO 250"
else if hcsls901.mcod = "AY23Q5" then
model = "JETTA"
endif
endif
endif

Declare variable model same as hcsls901.mcod

Regards

JaapJD
14th February 2014, 11:58
Use:

if strip$(hcsls901.mcod) = "6424G3"
...
endif

Or even better:

on case strip$(hcsls901.mcod)
case "6424G3": model = "POLO 251" break
case "6414G3": model = "POLO 250" break
case "AY23Q5": model = "JETTA" break
default: model = "????" break
endcase