7 Replies Latest reply: Jan 22, 2018 6:25 AM by Ruggero Piccoli RSS

    Picture Box Rotation


      Hi everyone,

      I would like to know whether it is possible, when creating a picture box, to rotate it directly on Report Designer or I need to define it on the script? Do you know any workaround to do that?


      Thank you

        • Re: Picture Box Rotation
          Ruggero Piccoli



          In what kind of report?




            • Re: Picture Box Rotation

              I encounter the mentioned issue in PixelReport

                • Re: Picture Box Rotation
                  Ruggero Piccoli



                  There is not a control to rotate images. To achieve the required result:

                  1. Change the scripting language of the document to Visual Basic
                  2. Add the image in the template and keep it selected
                  3. In the image propreties grid selec BeforePrint event in the script menu
                  4. Create a new Visual Basic script and add the code

                  Private Sub xrPictureBox1_BeforePrint(sender As Object, e As System.Drawing.Printing.PrintEventArgs)
                     Dim _pictureBox As XRPictureBox = TryCast(sender, XRPictureBox)
                     Dim _image As Image = _pictureBox.Image
                     Dim _bitmap As New Bitmap(_image)
                     Dim _graphics As Graphics = Graphics.FromImage(_bitmap)
                    _graphics.DrawImage(_image, 0, 0, _image.Width, _image.Height)
                    _pictureBox.Image = _bitmap
                  End Sub

                  For more details about PixelPerfect scripts refer to the video



                  Best Regards,



                  When applicable please mark the appropriate replies as CORRECT. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads as HELPFUL if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads as HELPFUL if you feel additional info is useful to others.