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

How do I get a PDF in different folder

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

    How do I get a PDF in different folder

    I have a directory under my alpha files called part dwgs that contains PDF files. Sometimes I can get the button to open the PDF file and other times it says it does not exist. Is there a code to direct the button to a specific folder?

    #2
    Re: How do I get a PDF in different folder

    Originally posted by tdorg View Post
    I have a directory under my alpha files called part dwgs that contains PDF files. Sometimes I can get the button to open the PDF file and other times it says it does not exist. Is there a code to direct the button to a specific folder?
    What button?
    There can be only one.

    Comment


      #3
      Re: How do I get a PDF in different folder

      Hi Tommy,

      I usually create a variable and place it on a form... then choose the "File Select" or Folder Select" Smart field for the Control Type that you can set from the Setup tab of the field's properties.
      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


        #4
        Re: How do I get a PDF in different folder

        I have attached a backup of my application. Don't hammer me too bad on it.
        I am trying to learn but need to get this function working. In the Program & Drawing search form I want to push a button and have it open the drawing listed in the drawing field. I only have one right now. It is tied to my program number and populates when I enter the program no. in this case 3312. I currently have it where it will open a Windows file explorer and want me to select the file but not been able to get it to open consistently just using the open method.

        Comment


          #5
          Re: How do I get a PDF in different folder

          MikeC,
          I got your method to kind of work but it replaces the drawing name in the drawing field. I need the drawing name to come from the table and be able to print that drawing by pressing the button next to the field.

          Comment


            #6
            Re: How do I get a PDF in different folder

            Hi Tommy,
            I tried to open the Program & Drawing...form but something is either corrupted or possibly due to my using version 8 (unlikely in this case).

            Did you test your sample?? IF so and it works then I'm at a loss...Without the sample I am still not exactly sure of what you want to do...with it am sure a solution can be given.

            Maybe someone else will have better luck.
            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


              #7
              Re: How do I get a PDF in different folder

              So you could not even open the form? I downloaded the same backup on my laptop and works fine.

              Comment


                #8
                Re: How do I get a PDF in different folder

                Tommy,

                could not even open the form
                correct....not even in design mode.

                So really cannot even guess much as to how to help...maybe, and a real long shot, is the sample I've attached may be of some use.

                It uses an embedded browse with buttons that will play mp3 on one form or videos on a different one. You first have to navigate to a mp3 or video file and "set" it so that that the path is then included in the table (browse). Again just a thought that this may be similar to what you are trying to do--the activex can be used for pdf as well (different activex object).
                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


                  #9
                  Re: How do I get a PDF in different folder

                  Opens fine in V9 - one thing that stands out to me is that you seem to have two different path variables, and the one you use doesn't have the forward slash after the folder name:

                  Code:
                  [B]var->path2 = ""[/B]
                  
                  t5 = ""
                  
                  t5 = a_db_current_path
                  
                  [B]var->Path = t5[/B]
                  
                  prmpt_title = "Select PDF Document"
                  
                  prmpt_filter = "*.pdf"
                  
                  prmpt_default = [B]var->path[/B]
                  (What is t5?)

                  Anyway if I generate the dialog using the Xbasic genie I get (assuming the folder is called PDFs):

                  Code:
                  'Prompt for a filename and store result in a variable called 'var_file'.
                  dim prmpt_title as c 
                  dim prmpt_filter as c 
                  dim prmpt_default as c 
                  dim prmpt_flag as c 
                  
                  prmpt_title = "Select File"
                  prmpt_filter = "(*.pdf)"
                  prmpt_default = A5.GET_PATH()+chr(92)+"PDFs"+chr(92)
                  
                  DIM SHARED var_file AS C
                  
                  var_file = ui_get_file( a5_eval_expression(prmpt_title,local_variables()),prmpt_filter,prmpt_default,"X")
                  I added the
                  Code:
                  a5.get_path() + chr(92)
                  before the folder to make sure this is always pointing at the right directory. This seems to be working fine for me...

                  Comment


                    #10
                    Re: How do I get a PDF in different folder

                    Noetic, Thanks for the help. I have used Alpha in the past but never had to get into any real programming like now. Have not used it since 4.5 was first released. Can I change your code and make it open the file listed in a field called drawing?

                    Comment


                      #11
                      Re: How do I get a PDF in different folder

                      Originally posted by tdorg View Post
                      Noetic, Thanks for the help. I have used Alpha in the past but never had to get into any real programming like now. Have not used it since 4.5 was first released. Can I change your code and make it open the file listed in a field called drawing?
                      You should be able to use the Xbasic genie to do this, this is code I adapted from the "Open a non-Alpha 5 file" option. When you say "another folder", where is the folder in relation to the Alpha5 directory? If the folder is ALWAYS in the same place, just hard-code the path and add the filename at the end.

                      Code:
                      DIM filename as c 
                      filename = 	a5_eval_expression("=Drawing",local_variables())
                      filename = a5.Get_Path()+chr(92) +"files" + chr(92) + filename
                      
                      if file.exists(filename) then 
                      	sys_open(filename)
                      else
                      	ui_msg_box("Error Opening File","File '"+filename+"' does not exist.",ui_stop_symbol)
                      end if

                      Comment


                        #12
                        Re: How do I get a PDF in different folder

                        Tommy,

                        You may want to look at the PDF Viewer Supercontrol which allows you to embed the pdf right into the form. so when you navigate to the drawing, it is there, no opening of the pdf.
                        Bill Griffin
                        Parkell, Inc

                        Comment


                          #13
                          Re: How do I get a PDF in different folder

                          Eureka I finally got it working. Thanks so much for all the help folks.
                          One other ?. My Xbasic manual is from 4.5. Would I benefit from buying the version 8 book or is it pretty much the same book?

                          Comment


                            #14
                            Re: How do I get a PDF in different folder

                            Originally posted by tdorg View Post
                            Eureka I finally got it working. Thanks so much for all the help folks.
                            One other ?. My Xbasic manual is from 4.5. Would I benefit from buying the version 8 book or is it pretty much the same book?
                            The download/PDF is only about $20 so go for it - the online help files have a lot of information though, and if I were you I'd try the Xbasic genies first because a lot of the time they have a solution ready :)

                            Comment


                              #15
                              Re: How do I get a PDF in different folder

                              I actually kept trying to use the genie as you did and edit the code and it would not let me save my changes. What is the best way to do that?

                              Comment

                              Working...
                              X