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

Getting a Jpeg Picture

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

    Getting a Jpeg Picture

    Hi

    Is it possible if to click on a say part number field in a browser form like attached file and once click you will get a Jpeg or bmp File come up, if this can be done can some explain to me how to go about this please
    (Easy Terms Please)

    Peter.

    #2
    Re: Getting a Jpeg Picture

    Peter,

    I don't know of an easy way to click on the part number to bring up an image, but it's not hard to accomplish the same result by doing one of two things...

    1. You can place a button in the browse that says "View Image". This button would appear on every row of the browse, I think you could even make the button conditional, meaning that if an image exists for the part then the button would be there and if you do not have an image for the part then the button would either not be there or would be disabled. I havent played with conditional buttons, but I think it might be possible.

    2. You can place an option in the right click menu of the browse to show an image. I am certain that this option can be disabled if a logical condition is false...such as the image existing.

    Regardless of which of the two methods above you choose, you can then open either an X-Dialog or a form which will display your image.

    If you need futher assistance, I might be able to create a sample for you...just let me know.

    Best of Luck

    Louis

    Comment


      #3
      Re: Getting a Jpeg Picture

      Peter,

      We have a need it view client photos for verification puropses. I have created an x-basic script that we use on a menu or under a button on a form. I think you could adapt it for your needs. This is from v5.

      Code:
      'Date Created: 14-Jan-2003 12:36:56 PM
      'Last Updated: 23-Aug-2006 02:12:54 PM
      'Created By  :
      'Updated By  : Tom Henkel
      
      ' **************We have global veirables, and needto do some testing
      '                    before we actually try to display te image.
      
      dim aa as P
      aa= addin.variables()
      varinit()
      dim aa.bcbss as P
      'debug(1)
      dim shared access as N
      dim global oldfile as C
      tbl = table.current()
      
      if tbl.mode_get() > 0 then
       	parent.commit()
       else
      	dim pict1 as C
      	if .not.exist(client->SSN,"image.dbf","ssn") then
      		ui_msg_box(trim(aa.bcbss.agency)+" Client Information System","No Image Record exists for this Client")
      		end
      	  else
      	  	tbl2 = table.open("image.dbf")
      		tbl2.index_primary_put("ssn")
      		tbl2.fetch_find(client->ssn)
      		if upper(tbl2.Alt_payee)="X"
      			name1 = upper(trim(tbl2.alt_fname)+" "+trim(tbl2.alt_lname))+" - Auth Rep"
       		  else
       		  	name1 = upper(trim(client->fname)+" "+trim(client->lname))
      		end if
      		tbl2.close()
      	end if
      	pict1 = lookupc("F",client->SSN,"image","image.dbf","ssn")
      	oldfile = "G:\IMAGES"+chr(92)+trim(pict1)+".jpg"
      	if .not. file.exists(oldfile)
      		ui_msg_box(trim(aa.bcbss.agency)+" - Error!","No Photo Exists for "+name1)
      		end
      	end if
      	
      '**************************************************
      'This is where we actually display the image
      	
      
      	'new code for xdialog inserted here
      	f = file.open(oldfile,FILE_RO_SHARED)
      	ui_bitmap_load("temp",f.readb(10000000))
      	f.close()
      	ui_dlg_box(name1,<<%dlg%
      	{lf};
      	{image=temp}; 
      	{lf};
      	<*15&Close>
      	%dlg%)
      	ui_bitmap_drop("temp")
      
      '**************************************************
      end if
      end
      Hope this helps,

      Tom

      Comment


        #4
        Re: Getting a Jpeg Picture

        Hi Louis & Tom

        Thanks for the time and effort for replying but I�m sorry to say that went way, way, over my head,
        I have just graduated from forms; I have no knowledge of x-basic script so again thanks for trying, I will just have to think of some else I might have a go the button and see where I get

        Peter.

        Comment


          #5
          Re: Getting a Jpeg Picture

          Peter,

          Don't give up...this is really simple.

          I have been testing the suggestions I gave you and it took about 10 minutes to have a working solution...and I only had to write 1 very simple line of code...not to mention, it is really cool the way it works.

          Give me your email address and I will allow you to connect to my PC and take a look at what I have done.

          Louis

          Comment


            #6
            Re: Getting a Jpeg Picture

            Louis

            Thanks for the offer but at present am working in Turkmenistan and the network is dead slow I'm having trouble connecting to this forum may be after the 20th I might take you up on it as I will be home in the UK

            Peter.

            Comment


              #7
              Re: Getting a Jpeg Picture

              One heck of a commute!!

              Comment


                #8
                Re: Getting a Jpeg Picture

                Peter,

                No problem...If I have time, I will make a simple example for you and attach it to this thread. If not, feel free to contact me when you get back home.

                Louis

                Comment


                  #9
                  Re: Getting a Jpeg Picture

                  Originally posted by PeterH View Post
                  Hi

                  Is it possible if to click on a say part number field in a browser form like attached file and once click you will get a Jpeg or bmp File come up, if this can be done can some explain to me how to go about this please
                  (Easy Terms Please)

                  Peter.
                  [ATTACH]14675[/ATTACH]
                  A possible alternative would be to use the browse's onrowdblclick event. This would require a double click instead of a single click but that shouldn't be hard on anyone.

                  You code this event by opening the browse in design mode, access the Browse menu choice, Events, OnRowDblClick. Enter

                  sys_open(alltrim(fldname.value)+".jpg")

                  where fldname is the name of the column holding the Jpeg file name to be opened. In your case it appears it would be

                  sys_open(alltrim(partnumber.value)+".jpg")

                  This presumes that your images are stored in the directory with the rest of the database files. If not you would have to tell Alpha where they are like

                  sys_open("C:\imagedirectory"+chr(92)+alltrim(fldname.value)+".jpg")
                  There can be only one.

                  Comment


                    #10
                    Re: Getting a Jpeg Picture

                    Hi

                    I have followed what Stan has suggested but I get an Error message when I save, message says: the script/Function that you are about to save contains errors
                    Error at line: 6 column: 1 error expected value.
                    The line that I put in is as follows
                    'Date Created: 13-Jul-2007 03:17:23 AM
                    'Last Updated: 13-Jul-2007 03:42:49 AM
                    'Created By : Peter Hume
                    'Updated By : Peter Hume
                    sys_open("C:\Peter Folder\Alpha5V8\Woodwork inventory\Jpg"+chr(92)+alltrim(fldname.value)+".Jpg")
                    )
                    Can some please advise where I went wrong

                    Peter.

                    Comment


                      #11
                      Re: Getting a Jpeg Picture

                      Peter,

                      If Stan guessed correctly regarding your field name then subsitute partnumber as in below...???


                      where fldname is the name of the column holding the Jpeg file name to be opened. In your case it appears it would be sys_open(alltrim(partnumber.value)+".jpg")
                      Code:
                      sys_open("C:\Peter Folder\Alpha5V8\Woodwork inventory\Jpg"+chr(92)+alltrim([COLOR="Red"]partnumber[/COLOR].value)+".Jpg")
                      )
                      Mike
                      __________________________________________
                      It is only when we forget all our learning that we begin to know.
                      It's not what you look at that matters, it's what you see.
                      Henry David Thoreau
                      __________________________________________



                      Comment


                        #12
                        Re: Getting a Jpeg Picture

                        Hi Mike

                        Sorry I am a bit slow on this lark are you saying I have to replace the word partnumber with the actual part number it self,

                        Peter.

                        Comment


                          #13
                          Re: Getting a Jpeg Picture

                          Peter,

                          You said you used this as your script:

                          Code:
                          sys_open("C:\Peter Folder\Alpha5V8\Woodwork inventory\Jpg"+chr(92)+alltrim([COLOR="Blue"]fldname[/COLOR].value)+".Jpg")

                          Is fldname your actual field name??? or is it "partnumber" as Stan guessed.

                          Whatever your field name is it should be used in place of fldname
                          Mike
                          __________________________________________
                          It is only when we forget all our learning that we begin to know.
                          It's not what you look at that matters, it's what you see.
                          Henry David Thoreau
                          __________________________________________



                          Comment


                            #14
                            Re: Getting a Jpeg Picture

                            Mike

                            Thanks for you help I have managed to apply what you said and I can get the first row to work, I double clicked on and the correct jpg file came up, how I can get the other 200 to work

                            Peter.

                            Comment


                              #15
                              Re: Getting a Jpeg Picture

                              Peter,
                              If I understand all that Stan said and you are doing as he suggested then if your jpegs are entered in as part of each record then I cannot see where the problem lies. A doubleclick on a row would bring up the associated jpeg image--- as far as I can tell it should work easily for this.

                              Sorry I can't be of more help--I butted in as I noticed the other more learned people helping you weren't online---as I don't have V8 I cannot even help you out with a sample and such as I would like to as there may be some differences that just don't flow from one version of Alpha to the other.
                              Mike
                              __________________________________________
                              It is only when we forget all our learning that we begin to know.
                              It's not what you look at that matters, it's what you see.
                              Henry David Thoreau
                              __________________________________________



                              Comment

                              Working...
                              X