Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

CopyBitmapToClipboard does not work in webview?

I have created a macro that prints a Qlikview document to PowerPoint. The latest change requests on the document (stacked bar charts that have to align to a straight table, html extension, etc.) requires me to print in webview.

The macro cycles through the sheets, changes variables that drive content, changes the layer of objects that should not show in a printed copy (navigation buttons), copies and pastes the sheet image to PowerPoint. When the macro runs in webview, the sheets are blank as and the image pasted is also blank.

Is this a situation where the macro is the issue or does copybitmaptoclipboard not work in webview?

here is a section of the print macro:

__________________________________________________________________________________________

  ActiveDocument.Sheets("SH01").activate

  ActiveDocument.GetApplication.WaitForIdle

  Set sht = ActiveDocument.sheets("SH01")

  For j = 0 to sht.noofsheetobjects - 1

  If sht.sheetobjects(j).getobjecttype = 6 Then

  Set obj = activedocument.getsheetobject(sht.sheetobjects(j).getobjectid)

  objprop = obj.getproperties

  If objprop.layout.frame.zedlevel = -5 Then

  objectID = sht.sheetobjects(j).getobjectid

  objprop.layout.frame.zedlevel = -3

  obj.setproperties objprop

  'Exit For

  End If

  End if

  Next

  ActiveDocument.GetApplication.WaitForIdle

  objPresentation.Slides(objpresentation.slides.count).duplicate

  Set PPSlide = objpresentation.slides(slidenum)

  sht.CopyBitmapToClipboard

  PPSlide.Shapes.Paste

  ActiveDocument.ClearCache

  objpresentation.windows(1).activate

  PPSlide.Select

  PPSlide.Shapes(8).Select

      PPSlide.Shapes(8).PictureFormat.CropRight = 275

      PPSlide.Shapes(8).Left = 1

      PPSlide.Shapes(8).Top = 20

      PPSlide.Shapes(8).ScaleHeight 0.9, msoCTrue

  Set obj = Activedocument.getsheetobject(objectid)

  objprop = obj.getproperties 

  objprop.layout.frame.zedlevel = -5

  obj.setproperties objprop

__________________________________________________________________________

Can anyone help me with this please?

8 Replies
Miguel_Angel_Baeyens

Hi,

Since you are using the Ajax client, CopyBitmapToClipboard will not work. This method requires local access to your clipboard, which is not possible. That could work if you use the Plugin for IE instead, but note that again, the macro will run locally, meaning that it will adjust to the user screen resolution, not the server's (or yours).

I'd recommend you instead to create a new Report using Desktop and set all objects and sheets there.

Miguel

Not applicable
Author

Can the report be printed to PowerPoint?

Lana Mitchell

Technical Specialist II - Application Developer

Miguel_Angel_Baeyens

Hi,

Any report in QlikView can be only printed to PDF. QlikView Server installs a PDF driver to make this possible.

Miguel

Not applicable
Author

Thank you for your help Miguel.

PowerPoint is a must have for our clients. I will try using a report and printing to PDF then use Adobe's PDF to PPT converter. Hopefully that will be a solution.

jerrysvensson
Partner - Specialist II
Partner - Specialist II

If you have to do many of these things I recommend to have a look at NPrinting.

Not applicable
Author

We already did. The way our document is structured, NPrinting will not work for us. We had a discussion with a couple of the sales representatives there who agreed that the current version will not work for our needs.

Not applicable
Author

And what if there are Extension objects (which require WebView) -- I believe those cannot be shown in the PDF report, right?         

Not applicable
Author

That is correct Nathaniel. Web extensions will not show up in a PDF report.