Page 1 of 1

Image column in table

Posted: Fri Apr 27, 2018 3:33 pm
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?

Re: Image column in table

Posted: Fri Apr 27, 2018 4:59 pm
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'