Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

download table as a picture on user PC (Ajax)?

In V10 Plug-in, we have managed the user requirement using a macro.

Macro will save the table as a picture on user PC and rename it with the content of two fields (see attached demo).

The macro defined is:

sub export_jpeg
GraphPath = "c:\Documents and Settings\"

Dim file_name
Dim ProgramCode
Dim ProgramName
Dim User

ProgramCode = ActiveDocument.Variables("Program_C").GetContent.String
ProgramName = ActiveDocument.Variables("Program_N").GetContent.String
User =  ActiveDocument.Variables("User_N").GetContent.String

file_name = "\My Documents\" &ProgramName &"-"&ProgramCode &"-" & year(date) & VerifLenDate(month(date)) & VerifLenDate(day(date)) & ".jpg"

ActiveDocument.GetSheetObject( "CH136").ExportBitmapToFile GraphPath & User &file_name

msgbox("File saved under: C:\Documents and Settings\" &User &file_name)
end sub


Function VerifLenDate(param)

if len(param) = 1 then
  param = "0" & param
end if
VerifLenDate = param

end function

However we will upgrade our QV environment from V10 – Plug-In to V11 – Ajax mode.

                        This functionality doesn’t work anymore (due to the ajax upgrade).

                        How can fit the user requirement in ajax (with or without using a macro)?

3 Replies
Anonymous
Not applicable
Author

Without a macro, the best way to save a pic from the Ajax client is to right click an object, choose Print, then save the image from the popup window.

Not applicable
Author

Thanks Johannes,

Users used to save picture with this action in IE Plugin. With your

solution, they have to know specific informations about the active selection

to save the picture with the correct name at the right place. I really need

to keep this action automatic in order to avoid user mistake.

Not applicable
Author

We have tried Johannes solution with a "right click on object, choose Print, then save the image from the popup window".

The first option is to save the object in HTML. It not what we want.

An other option is to save the document as a PDF document. But with this option, object layout is far from what is showing in Ajax : background color and some cells line (with null value) have disappear. Is there any other solution to solve this request ?

Even "the copy image to clipbord" option is not avaible !

As final result, we need a picture in jpeg format, with same color, font...