Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
swati_rastogi27
Creator
Creator

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?

2 Replies
Gysbert_Wassenaar

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
swati_rastogi27
Creator
Creator
Author

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