Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

Ink Control on a report w/ background

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Ink Control on a report w/ background

    Has anyone had any luck with the printing of an Ink control in a report WITH the saved background?

    I've confirmed that the background image is being saved in the ink control. All I get in my report are the markings however.

    Using 4584_4961.
    Mike Brown - Contact Me
    Programmatic Technologies, LLC
    Programmatic-Technologies.com
    Independent Developer & Consultant​​

    #2
    Re: Ink Control on a report w/ background

    What method are you using to set the background image of the Ink control ?

    Comment


      #3
      Re: Ink Control on a report w/ background

      I think it's inherent of the control. When I look at the data in SQL I see it referenced there. And to be honest I haven't looked into this more. I may totally be wrong.

      Code:
      #A5Ink
      version 1.0
      settings %json%
      {"page":{"width":4.5,"height":3,"unit":"in","dpu":300,"lines":false,[COLOR="#FF0000"]"background":{"image":{"data":"Human_Figure_Diagram.png"[/COLOR],"position":"center","size":{"width":1500,"height":1060},"type":"image"},"color":""}},"meta":{"bounds":{"l":141,"t":88,"r":1165,"b":698},"created":"2017-09-22 11:19:35 am","modified":"2017-09-22 11:19:41 am","pen":{"color":"#f00","width":9,"lineCap":"round"}}}
      %json%
      A pen 9 #f00
      S 340,305,lVe+42++42J+46N+28OILCWt+32-52+27-86G-103+-67-32-59yl-29c-49R-57+41-59+77-47+96q+86G+59Y+40+32S+52E+61++114x+145-60+197-140+49-74H-44+-30mxlmljmb-27J-54+47-148+179-59+136g+84JV+41+57+40X+54J+62G+96d+118w+116-37+74-37+34-41OyEt+o+g
      Mike Brown - Contact Me
      Programmatic Technologies, LLC
      Programmatic-Technologies.com
      Independent Developer & Consultant​​

      Comment


        #4
        Re: Ink Control on a report w/ background

        Try to set your background using code :

        Create a callback function :

        function xb as c (e as p)
        dim fn as c

        fn = "c:\dump\body-diagram.png"
        dim b as b
        b = file.to_blob(fn)
        dim b64 as c
        b64 = base64encode(b)
        b64 = "data:image/png;base64," + b64

        dim js as c
        js = <<%str%
        var inkObj = {dialog.Object}.getControl('INK1');
        var _obj = {save: true, image: {data: '__b64__'}};
        inkObj.setBackground(_obj);
        %str%

        js = stritran(js, "__b64__", js_escape(b64))

        xb = js
        end function

        Then use a button to execute callback.

        Have you watched the Alpha video UXINK_V12--5 ?
        That video helped me.

        Comment


          #5
          Re: Ink Control on a report w/ background

          Also, How do you get your ink data/field on a report ?

          Comment


            #6
            Re: Ink Control on a report w/ background

            I would also like to know how to do this?

            There doesn't seem to be any instructions on putting ink data on a report, which would be a really nice thing to be able to do.
            Alpha Anywhere v12.4.6.5.2 Build 8867-5691 IIS v10.0 on Windows Server 2019 Std in Hyper-V

            Comment


              #7
              Re: Ink Control on a report w/ background

              I followed post #4 suggestion. Now the background saves where as before it did not.

              As for the report I've gotten it to work too BUT the image is cut off. In the data source section of the report I've overridden the column to "INK Image". On the report itself I've "sized to fit" and tried various height/width combinations. Most of the image is there but not all. Still trying to determine what I'm missing.
              Mike Brown - Contact Me
              Programmatic Technologies, LLC
              Programmatic-Technologies.com
              Independent Developer & Consultant​​

              Comment


                #8
                Re: Ink Control on a report w/ background

                For what its worth, I have sent in a request to Alpha asking if they could demonstrate how to do this in one of their Q&A Webinars.
                Last edited by iRadiate; 10-03-2017, 05:45 PM.
                Alpha Anywhere v12.4.6.5.2 Build 8867-5691 IIS v10.0 on Windows Server 2019 Std in Hyper-V

                Comment


                  #9
                  Re: Ink Control on a report w/ background

                  To solve that I did a work around (It works for me .....not 100% happy with it though, i hope there is an easier way):

                  I placed a bitmap object on my report and in "Filename" property of the bitmap object I called the following function in the "Dynamic" section:

                  ink_page(ink)

                  (where ink is the field storing the ink text)

                  Defintion of the function is :


                  FUNCTION ink_page AS C (ink AS C)
                  ' Parameters:
                  ' ink - ink image in the form of text

                  dim fn_png as c
                  dim fn_bmp as c
                  dim fn as C

                  fn = FILE.TEMP_PATH_GET() + "ink_" + A5ws_GetCurrentUser()

                  fn_png = fn + ".png"
                  fn_bmp = fn + ".bmp"

                  a5_ink_to_png(ink, 792 ,612, fn_png, .T.)


                  dim img as B
                  dim img2 as B
                  dim fptr as P
                  dim fptr2 as P
                  dim length as N
                  fptr = file.open(fn_png, FILE_RW_EXCLUSIVE)
                  length = fptr.bytes_get()
                  img = fptr.readb(length)
                  img2 = png_to_bitmap(img)
                  fptr2 = file.create(fn_bmp, FILE_RW_EXCLUSIVE)
                  fptr2.writeb(img2)
                  fptr2.close()
                  fptr.close()

                  ink_page = fn_bmp
                  END FUNCTION

                  Comment


                    #10
                    Re: Ink Control on a report w/ background

                    Robert, where are you placing the actual function code?
                    Alpha Anywhere v12.4.6.5.2 Build 8867-5691 IIS v10.0 on Windows Server 2019 Std in Hyper-V

                    Comment


                      #11
                      Re: Ink Control on a report w/ background

                      Interesting, Robert. I could probably use this a5_ink_to_png() function in my ink component to save a png image to the same SQL table the ink control uses. Then just use that in the report.
                      Mike Brown - Contact Me
                      Programmatic Technologies, LLC
                      Programmatic-Technologies.com
                      Independent Developer & Consultant​​

                      Comment


                        #12
                        Re: Ink Control on a report w/ background

                        http://www.viddler.com/v/5e2ba2cc

                        Q&A August 3, 2016

                        Go to 38:40.

                        Comment


                          #13
                          Re: Ink Control on a report w/ background

                          Originally posted by iRadiate View Post
                          Robert, where are you placing the actual function code?
                          I placed the function in the global function section of my project.
                          i.e. Control Panel / Code

                          Comment


                            #14
                            Re: Ink Control on a report w/ background

                            Originally posted by gilbertro View Post
                            I placed the function in the global function section of my project.
                            i.e. Control Panel / Code
                            Thanks!
                            Alpha Anywhere v12.4.6.5.2 Build 8867-5691 IIS v10.0 on Windows Server 2019 Std in Hyper-V

                            Comment


                              #15
                              Re: Ink Control on a report w/ background

                              Originally posted by The Mage View Post
                              http://www.viddler.com/v/5e2ba2cc

                              Q&A August 3, 2016

                              Go to 38:40.
                              A-ha! That's perfect, this video shows the trick to putting the ink onto a report at the 25:45 minute mark. I would never have figured this out, it is simple but not at all obvious.

                              Rendering the ink over a background image is shown at 38:40

                              Thanks very much William
                              Last edited by iRadiate; 10-04-2017, 08:46 AM.
                              Alpha Anywhere v12.4.6.5.2 Build 8867-5691 IIS v10.0 on Windows Server 2019 Std in Hyper-V

                              Comment

                              Working...
                              X