Image column in table

Please do not use to report errors- use your regional help desk.
Please mark posts as being for RPG or RDMLX (LANSA) developer.
To subscribe by email, display this forum, scroll to the end and select ‘Subscribe Forum’.
Post Reply
soapagent
Posts: 93
Joined: Mon Jul 16, 2012 6:19 pm

Image column in table

Post by soapagent »

Bit rusty on my Longrange so forgive me if this is dumb!

I have a table with the following column

#COM_OWNER.Set_Table Name(tabStudents) Col_N(8) Col_Name('Tick') Col_Width(20) Col_Type(Image)

and am trying to display a tick image

#tickstring := '/images/image-tick.png'

#COM_OWNER.Set_Image Name(tabStudents + '.Row%' + #x.AsString + '.Tick') Image(#tickstring) Valign(top) Halign(left)

But nothing is displayed an no errors occur.

The image name is a valid image in a public folder on our website where the lomgrange app is running from and I can display it in the browser.

Any idea where I'm going wrong?
jasonzhou
Posts: 130
Joined: Wed Jan 11, 2017 3:26 pm

Re: Image column in table

Post by jasonzhou »

Could you please try the following ways out seeing if it works ok? Thanks.

(1) use relative image path
for example:
#tickstring := '../../webserver/images/image-tick.png' (or #tickstring := '../webserver/images/image-tick.png')

(2) use full image path
#uImageDirectory := *SYS_DIR

If Cond(*CPUTYPE = 'AS400')

#uImageDirectory := #uImageDirectory.Replace( '/x_lansa/' '/webserver/images/LongRange/demo/' )

Else

#uImageDirectory := #uImageDirectory.Replace( '\X_WIN95\X_LANSA\' '\webserver\images\LongRange\demo\' )

Endif


#tickstring := #uImageDirectory + 'image-tick.png'
Post Reply