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

Prompting for a variable

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

    Prompting for a variable

    I would like to print a report but before the report starts to print, I would like it to prompt the user to enter a date rather than have it use the system date. I assume that this variable should be set for the session?

    Thanks!

    #2
    RE: Prompting for a variable

    My personal preference is to set all my variables as global. This way, I can use the variable anywhere I want (which I often do). I've never had a problem doing this.

    There may be an advantage to setting a session variable...maybe someone else can offer ideas.

    Comment


      #3
      RE: Prompting for a variable

      Bill,

      The only reason I'm considering using session is because its only going to be used to print letters. When I select the letter to print, can I get it to prompt me as to what date I want ?

      Comment


        #4
        RE: Prompting for a variable

        Arthur,

        The easiest but by no means the only way is to use the ui_get_date() command. See page 207 of the printed user manual.

        Michael

        Comment


          #5
          RE: Prompting for a variable

          Michael,

          My page 207 talk about "Implementing Security". Could you tell me the name of the Chapter please?

          Thanks!

          Comment


            #6
            RE: Prompting for a variable

            Arthur,
            In my experience, if you want to print the date on the report (or letter) it needs to be a global variable. If it is only for selecting records, then a session variable should work.
            Pat Bremkamp
            MindKicks Consulting

            Comment


              #7
              RE: Prompting for a variable

              In my manual it is Chapter 21: Xbasic User Interface commands.

              But give this a try.

              Dim global My_var_name as d
              My_var_name=ui_get_date("Date required","Enter your date")

              This will bring up a box asking for your date and you can then filter the print on that variable.

              I think you must use a global(not session) variable because when you go into printing your report you will exit your session and the variable will not be available.

              Michael

              You can create the variable on your form or use xbasic as above.

              Comment


                #8
                RE: Prompting for a variable

                Micheal,

                I found the info you spoke of on page 254 of my Xbasic Manual. When I create the variable, it asks for Level, Name, Type and Value. I left the value blank and placed the variable on my layout. When I right clicked on it, Actions was not available for me to type in the Xbasic.

                What I'm trying to do is when the user clicks on the Print Letter Button, I want it to ask the User to Enter Letter Date.

                I'm not doing anytime of calculation or query. I just want the date put in the letter that the User specifies.

                You're help is appreciated. Thanks!

                Comment


                  #9
                  RE: Prompting for a variable

                  Arthur, open your report layout in design mode. Click Report menu. Pick Variables off the drop down list. If your variable is listed there and defined as global all you have to do is drop it on your layout.

                  Now, save the report and go back to the form from which the user will call the report.

                  Open the form in design mode. Is the same variable defined as a global variable there, too?

                  If so, when the user answers the ui_get_date() question whatever value they supply will be stored in the variable for you, and will appear in the report. You don't need to quiz the user again after the report starts.

                  Misspellings of the variable name will break the linkage.

                  -- tom

                  Comment


                    #10
                    RE: Prompting for a variable

                    right click in the index area of the manual (top) and select update page numbers only
                    Cole Custom Programming - Terrell, Texas
                    972 524 8714
                    [email protected]

                    ____________________
                    "A young man who is not liberal has no heart, but an old man who is not conservative has no mind." GB Shaw

                    Comment


                      #11
                      RE: Prompting for a variable

                      Tom,

                      The problem I'm having is trying to find where I can define this variable so that I can put the Xbasic program in. On the report design it ask for a value. I would like the user to put that value in.

                      If I create a variable and then right click on variable, there is no "Action" to select.

                      Thanks for your help!

                      Comment


                        #12
                        RE: Prompting for a variable

                        Tom,

                        I have created the Global variable and assigned it to the Table. Unfortunately, I still can't find how to specify the Action. The Global variable does show up when I go to place it in the report but right clicking on it does display Action.

                        Comment


                          #13
                          RE: Prompting for a variable

                          Arthur, two thoughts.

                          1) There is no need to attach an action script to the variable in your report layout. Most would add the xbasic script to the onPress event of the button which calls the report (in the calling form). It's there that I'd prompt the user for the date, and store it in the variable. Since it's global, the report will be able to 'see it' just fine, as long as the variable in the report is spelled the same as the variable in the calling form.

                          2) If this remains mysterious, how about zipping a sample of your database and attaching it to a message. We can tweak it for you and repost it, then you can tear it apart and 'see how we did it'.

                          -- tom

                          Comment


                            #14
                            RE: Prompting for a variable

                            Tom,

                            I have zipped my information. I have also included a readme.txt file with information for you. I appreciate your taking the time to look at this.

                            Thank you !

                            Comment


                              #15
                              RE: Prompting for a variable

                              Arthur, here's my zipped reply. Unzip it into a different folder than your development folder, then check out the readme text file.

                              -- tom

                              Comment

                              Working...
                              X