Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Make your voice heard! Participate in the 2020 Wisdom of Crowds® Survey. BEGIN SURVEY
Highlighted
swati_rastogi27
Contributor

Save screenshot

Hi ,

I found below code on one of the community posts to capture screenshot:

public function ExportImage

  ActiveDocument.GetApplication.WaitForIdle

   ActiveDocument.GetSheetByID("SH06").Activate

   vFolder = ActiveDocument.GetVariable("vExportFolder").GetContent().String

    ActiveDocument.GetApplication.WaitForIdle

   set obj = ActiveDocument.GetSheetByID("SH06")

   ActiveDocument.GetApplication.WaitForIdle

   fileName = "ExportScreen_" & replace(replace(replace(date() & "_" & time(), "/", ""), ".", ""), ":", "") & ".png"

   ActiveDocument.GetApplication.WaitForIdle

   obj.ExportBitmapToFile vFolder & fileName

end function

Here vExportFolder=mid(DocumentPath(), 1, index(DocumentPath(), '\', -1))

On my desktop it works perfectly fine and saves it in the same location as my QVW.

When I host this application on the server, where will it be saved when users access it from AccessPoint?

Tags (1)
2 Replies
Highlighted
MVP & Luminary
MVP & Luminary

Re: Save screenshot

No idea. At least not anywhere on the users machine. The Qlikview server does not have access to it. I wouldn't be surprised if the macro doesn't even run. A lot of macros only work in QV Desktop.


talk is cheap, supply exceeds demand
Highlighted
swati_rastogi27
Contributor

Re: Save screenshot

Is there any way I can add this functionality(capturing screenshot) so that it may work on server too ?