3 Replies Latest reply: Nov 12, 2012 8:57 AM by harounadrame RSS

    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)?