Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
manishkumar75
Partner - Creator II
Partner - Creator II

Image

How to change the External Image dynamically in QlikView?

1 Solution

Accepted Solutions
manishkumar75
Partner - Creator II
Partner - Creator II
Author

Hi Michael,

I have solved the issue :-

Sub SetWall

set textImg = ActiveDocument.getsheetobject("TX08")
set picture = ActiveDocument.Variables("vP").GetContent
set tp = textImg.GetProperties
tp.Layout.Text.v = picture.string
textImg.SetProperties tp

End Sub

Thanks,

Manish

View solution in original post

6 Replies
Not applicable

If you're talking about changing an external image that is used for the background on a text box or chart or something, I have not found a way to do that using macros. I may be missing it in the API guide, but I could not find anything about image source.

I came up with a workaround to use multiple text boxes with the images I need. I then put them in the exact same position and base their visibility on a variable. In order to change the image, you just change the variable.

manishkumar75
Partner - Creator II
Partner - Creator II
Author

Hi Miller,

Thanks for ur reply.

Actually I need to develop a Administrator Panel kind of application in which I can change the Image of the QV page with the file available on my local disc. This is similar kind of functionality which is availabe with the Text Box to change the background image.

- Manish

Anonymous
Not applicable

Manish,
Is it what you want:

sub WP
set picture = ActiveDocument.Variables("vP").GetContent
status = ActiveDocument.SetWallPaper (picture.string , 1)
end sub

Variable vP contains the full path and name of the image.

manishkumar75
Partner - Creator II
Partner - Creator II
Author

Hi Michael,

I want the functionality similar to :


Sub SetWall
set textImg = ActiveDocument.GetSheetObject("TX08")
set tp = textImg.GetProperties

rem Setting the Background Image of Text

textImg.SetProperties tp

End Sub

Thanks,
Manish

manishkumar75
Partner - Creator II
Partner - Creator II
Author

Hi Michael,

I have solved the issue :-

Sub SetWall

set textImg = ActiveDocument.getsheetobject("TX08")
set picture = ActiveDocument.Variables("vP").GetContent
set tp = textImg.GetProperties
tp.Layout.Text.v = picture.string
textImg.SetProperties tp

End Sub

Thanks,

Manish

Not applicable

Interesting.

I have tried the code exactly as it is written except that i have TX09.

All I get is the path to the image as text in the textbox. Not the actual image.

Are there some more settings I have to do?