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 and Printing Ink Image on Report - edges cut off

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

    Ink Control and Printing Ink Image on Report - edges cut off

    I have an Ink Control on a UX Component and the ink data stored in a MySQL longtext field.
    I have a report that prints the ink image/data from the MySQL field.

    I however have a problem:
    The generated image on the report has about 1/4 inch of the right edge cutoff and about 1/4 inch of the bottom edge cutoff as well..
    Has anyone experienced this ?

    Any ideas ?

    #2
    Re: Ink Control and Printing Ink Image on Report - edges cut off

    I'm sorry, Robert, but I don't have a solution to that because I haven't gotten that far. In the latest builds, Alpha has added the ability to do the ink on different images dynamically, because it was something I asked for. Now I am wondering how to get both the photo with the ink on top of it onto a report. Would you mind sharing with me how you are doing that? Then I can try to accomplish it and see if I have the same issue with getting that cutoff on my image, too. Collaboration... :)
    Carol King
    Developer of Custom Homebuilders' Solutions (CHS)
    http://www.CHSBuilderSoftware.com

    Comment


      #3
      Re: Ink Control and Printing Ink Image on Report - edges cut off

      The UX Ink control is tightly bound with an optional Image control. I don't think the same is true in reports. I can display the Ink and I can display the Image... both by editing the data source, using Advanced Options and changing the default Ink (Memo) to Ink Image and the Image (Bitmap) to Jpeg Image.

      Back in the Report you can then drag the Ink over top the Image... but the proportions, sizing, etc. are not tuned to each other... as they are in the Ink control. I can position the Ink image and size it to fully display and get it displayed in the right place with reference to the image... but that's just for one record. They're out of place for other rows.

      Comment


        #4
        Re: Ink Control and Printing Ink Image on Report - edges cut off

        Here's a great tip from Max Hammond of Alpha Technology Solutions that I got this morning! I am really learning a lot via their mentoring service. Very valuable.

        In the override field definitions under Advance Options on the data source genie, I changed my attached_ink field from memo to Ink Image and left the field definition of my binary field (image_blob) as bitmap.

        THEN (the very cool thing...) in report design, do a calculated (xy) field like this:
        inkInImage = a5_composite_picture_and_ink(image_blob,attached_ink)

        My dynamic image AND the ink ARE scaling together! YAYYYYY!

        I am on Alpha build 3962 - 4772
        Carol King
        Developer of Custom Homebuilders' Solutions (CHS)
        http://www.CHSBuilderSoftware.com

        Comment


          #5
          Re: Ink Control and Printing Ink Image on Report - edges cut off

          Nice function. Be sure to check the doc on this... specially with reference to Windows 10.

          http://documentation.alphasoftware.c...20Function.xml

          Comment


            #6
            Re: Ink Control and Printing Ink Image on Report - edges cut off

            So, I wonder if that function can be used to smash the image binary and ink together to make a jpg to attach to an email??
            Carol King
            Developer of Custom Homebuilders' Solutions (CHS)
            http://www.CHSBuilderSoftware.com

            Comment


              #7
              Re: Ink Control and Printing Ink Image on Report - edges cut off

              Well if it cannot then you can include the report as an attachment...but knowing AS - you can probably get it done!
              NWCOPRO: Nuisance Wildlife Control Software My Application: http://www.nwcopro.com "Without forgetting, we would have no memory at all...now what was I saying?"

              Comment


                #8
                Re: Ink Control and Printing Ink Image on Report - edges cut off

                Originally posted by kingcarol View Post
                So, I wonder if that function can be used to smash the image binary and ink together to make a jpg to attach to an email??

                The a5_composite_picture_and_ink function produces an SVG file. Alpha Anywhere's charting namespace includes several functions that can be used to convert an SVG to another file type:
                Sarah Mitchell
                Director of Customer Success | [URL="https://www.alphasoftware.com"]Alpha Software Corporation[/URL]
                [B]Get in the know! [/B] Join us for our Weekly Webinars: [URL="https://www.alphasoftware.com/weekly-transform-tuesday-webinar"]TransForm Tuesday[/URL] and [URL="https://www.alphasoftware.com/weekly-alpha-anywhere-overview-webinar"]Wednesday's Alpha Anywhere Demo and Q&A[/URL]
                Connect with us: [URL="https://www.instagram.com/alpha_software_corp/"]Instagram[/URL] | [URL="https://twitter.com/AlphaSoftware"]Twitter[/URL] | [URL="https://www.facebook.com/AlphaSoftware/"]Facebook[/URL] | [URL="https://www.linkedin.com/company/alpha-software"]LinkedIn[/URL] | [URL="https://www.youtube.com/user/AlphaSoftwareInc"]YouTube[/URL]

                Comment


                  #9
                  Re: Ink Control and Printing Ink Image on Report - edges cut off

                  Originally posted by Beta Spark View Post
                  The a5_composite_picture_and_ink function produces an SVG file. Alpha Anywhere's charting namespace includes several functions that can be used to convert an SVG to another file type:
                  Sarah, I've tried by looking at your link for the charting::Chart::SvgToJpeg function, but I am going to need an example of doing this because I can't figure it out.

                  On a ux component, I have a field named image_blob_1 that is a binary field, and then a field named attached_ink_1 which is the memo field with the ink. Based on error messages I've received when trying an xbasic function, I first need to dim a variable as p to use the a5_composite_picture_and_ink function.

                  dim comPI as p = a5_composite_picture_and_ink(e.dataSubmitted.image_blob_1,e.dataSubmitted.attached_ink_1)

                  But from there, I have tried different things that all fail with the charting::Chart::SvgToJpeg function. I basically don't have a clue what to do with my variable comPI .
                  Carol King
                  Developer of Custom Homebuilders' Solutions (CHS)
                  http://www.CHSBuilderSoftware.com

                  Comment


                    #10
                    Re: Ink Control and Printing Ink Image on Report - edges cut off

                    Here's some guessing code I did and attached is a screenshot of the error that returned. (The image_blob_1 field on my ux is set as an Image control type. Does it need to be some other type?)

                    Code:
                    dim comPI as p = a5_composite_picture_and_ink(e.dataSubmitted.image_blob_1,e.dataSubmitted.attached_ink_1)
                    dim svg as c = convert_type(comPI,"C")
                    dim bl as b = charting::Chart::SvgToJpeg(svg)
                    file.from_blob("c:\Carol\testPhoto.jpeg",bl)
                    
                    'sys_open("c:\Carol\testPhoto.jpeg")

                    ErrorTryingToGetJpeg.jpg
                    Carol King
                    Developer of Custom Homebuilders' Solutions (CHS)
                    http://www.CHSBuilderSoftware.com

                    Comment


                      #11
                      Re: Ink Control and Printing Ink Image on Report - edges cut off

                      My apologies. The documentation is not clear on what exactly was being created and returned by a5_composite_picture_and_ink.

                      The a5_composite_picture_and_ink method returns a mime object, not just an SVG image. One of the methods available is toString(). This can be used to extract the SVG image data. EG:

                      Code:
                      dim comPI as p = a5_composite_picture_and_ink(e.dataSubmitted.image_blob_1,e.dataSubmitted.attached_ink_1)
                      [COLOR="#0000FF"][B]dim svg as c = comPI.toString()[/B][/COLOR]
                      dim bl as b = charting::Chart::SvgToJpeg(svg)
                      file.from_blob("c:\Carol\testPhoto.jpeg",bl)
                      
                      sys_open("c:\Carol\testPhoto.jpeg")
                      We'll be updating the a5_composite_picture_and_ink method with this information.

                      You can create your own mime objects using the *mime_object function.
                      Sarah Mitchell
                      Director of Customer Success | [URL="https://www.alphasoftware.com"]Alpha Software Corporation[/URL]
                      [B]Get in the know! [/B] Join us for our Weekly Webinars: [URL="https://www.alphasoftware.com/weekly-transform-tuesday-webinar"]TransForm Tuesday[/URL] and [URL="https://www.alphasoftware.com/weekly-alpha-anywhere-overview-webinar"]Wednesday's Alpha Anywhere Demo and Q&A[/URL]
                      Connect with us: [URL="https://www.instagram.com/alpha_software_corp/"]Instagram[/URL] | [URL="https://twitter.com/AlphaSoftware"]Twitter[/URL] | [URL="https://www.facebook.com/AlphaSoftware/"]Facebook[/URL] | [URL="https://www.linkedin.com/company/alpha-software"]LinkedIn[/URL] | [URL="https://www.youtube.com/user/AlphaSoftwareInc"]YouTube[/URL]

                      Comment


                        #12
                        Re: Ink Control and Printing Ink Image on Report - edges cut off

                        Thanks, Sarah. I have copied and pasted your code and still get this error:

                        Error executing Ajax callback. Error executing Ajax callback function 'CompressToJpeg ': command: dim bl as b = charting::Chart::SvgToJpeg(svg)
                        Exception has been thrown by the target of an invocation.
                        Root element is missing.
                        ===== Stack Trace Follows =====
                        System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Xml.XmlException: Root element is missing.
                        at System.Xml.XmlTextReaderImpl.Throw(Exception e)
                        at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
                        at System.Xml.XmlTextReaderImpl.Read()
                        at Svg.SvgTextReader.Read()
                        at Svg.SvgDocument.Open[T](XmlReader reader)
                        at Svg.SvgDocument.Open[T](Stream stream, Dictionary`2 entities)
                        at AlphaSoftware.Chart.SvgToImageLow(String svg, ImageFormat format)
                        at AlphaSoftware.Chart.SvgToJpeg(String svg)
                        --- End of inner exception stack trace ---
                        at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
                        at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters,
                        Carol King
                        Developer of Custom Homebuilders' Solutions (CHS)
                        http://www.CHSBuilderSoftware.com

                        Comment


                          #13
                          Re: Ink Control and Printing Ink Image on Report - edges cut off

                          OK, I decided that using e.dataSubmitted.IMAGE_BLOB_1 might be the problem because it is an image control on the ux, so I decided to do a query to my database as follows, (after doing connection, etc.) and that seems to be working:

                          Code:
                          dim entNum as n
                          entNum = convert_type(e.dataSubmitted.ENT_NUM,"N")
                          
                          sql = "select IMAGE_BLOB_1, ATTACHED_INK_1 from TblActivities where ENT_NUM = :whatEntNum"
                          dim args as sql::Arguments
                          args.add("whatEntNum",entNum)
                          cn.execute(sql,args)
                          dim rs as sql::ResultSet
                          rs = cn.ResultSet
                          
                          dim ib as b
                          ib = convert_type(rs.data(1),"B")
                          dim ink as C
                          ai = convert_type(rs.data(2),"C")
                          
                          dim comPI as p = a5_composite_picture_and_ink(ib,ai)
                          dim svg as c = comPI.toString()
                          dim bl as b = charting::Chart::SvgToJpeg(svg)
                          file.from_blob("c:\Carol\testPhoto.jpeg",bl)
                          Carol King
                          Developer of Custom Homebuilders' Solutions (CHS)
                          http://www.CHSBuilderSoftware.com

                          Comment


                            #14
                            Re: Ink Control and Printing Ink Image on Report - edges cut off

                            (Sorry to have hijacked this thread, Robert, but maybe this stuff will help with someone wanting to go further with image and ink.)

                            ANYWAY, Sarah, the code above is working to make the jpeg, but I would like to know how to retain the size of the original image. The resulting jpeg with the ink in it ends up at only 16KB (333 x 333), which is way too small to see the ink very well. The original image I am using is 827KB (1024 x 768). So, can I include something in the code to make the svg (or whatever) larger? Or is it the a5_composite_picture_and_ink function that is making it small?
                            Carol King
                            Developer of Custom Homebuilders' Solutions (CHS)
                            http://www.CHSBuilderSoftware.com

                            Comment


                              #15
                              Re: Ink Control and Printing Ink Image on Report - edges cut off

                              Originally posted by kingcarol View Post
                              (Sorry to have hijacked this thread, Robert, but maybe this stuff will help with someone wanting to go further with image and ink.)

                              ANYWAY, Sarah, the code above is working to make the jpeg, but I would like to know how to retain the size of the original image. The resulting jpeg with the ink in it ends up at only 16KB (333 x 333), which is way too small to see the ink very well. The original image I am using is 827KB (1024 x 768). So, can I include something in the code to make the svg (or whatever) larger? Or is it the a5_composite_picture_and_ink function that is making it small?
                              Without seeing a sample component/image/data, I'm not sure what would be affecting the image size. Could you post an example?
                              Sarah Mitchell
                              Director of Customer Success | [URL="https://www.alphasoftware.com"]Alpha Software Corporation[/URL]
                              [B]Get in the know! [/B] Join us for our Weekly Webinars: [URL="https://www.alphasoftware.com/weekly-transform-tuesday-webinar"]TransForm Tuesday[/URL] and [URL="https://www.alphasoftware.com/weekly-alpha-anywhere-overview-webinar"]Wednesday's Alpha Anywhere Demo and Q&A[/URL]
                              Connect with us: [URL="https://www.instagram.com/alpha_software_corp/"]Instagram[/URL] | [URL="https://twitter.com/AlphaSoftware"]Twitter[/URL] | [URL="https://www.facebook.com/AlphaSoftware/"]Facebook[/URL] | [URL="https://www.linkedin.com/company/alpha-software"]LinkedIn[/URL] | [URL="https://www.youtube.com/user/AlphaSoftwareInc"]YouTube[/URL]

                              Comment

                              Working...
                              X