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 suppress the prompt "specify Arguement Values"

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

    How do I suppress the prompt "specify Arguement Values"

    Hi,

    I've created an invoice report and a form based on an active-linked table.

    On the form are a bunch of questions that the user answers to determine which invoices are to be printed and I have arguments in the active-linked table to receive the answers.

    Like this...
    WHERE :doNew = 'yes' and dTrnInvPrinted = '1900-01-01'

    There are a bunch more, but that show what I'm doing.
    Everything works fine. The arguments get sent in the OnPush of the OK button and the report prints properly.
    But!

    When I run the form, I get the dialogue prompt to "Specify Argument Values".

    How do I suppress this?

    Also, is there some way to search here for a phrase. If I search for Specify Argument Values, I get 232 posts. If I search for "Specify Argument Values", I get none.

    #2
    Re: How do I suppress the prompt "specify Arguement Values"

    When I run the form
    I assume you mean open the form. You filter a form by setting the filter property. Open the form in design mode, use the Form menu, Form Properties, Filter/Order tab.
    There can be only one.

    Comment


      #3
      Re: How do I suppress the prompt "specify Arguement Values"

      Hi Stan,

      Yes, by run a form, I mean open it. I have a mainMenu. On it is a button, that Opens the form PrintInvoices

      When I click that button, I get the dialogue box that asks "Specify Arguments". I don't want that diglogue box.

      In the form PrintInvoices, I get answers to all the arguments in my active-linked table.

      I read in the documentation that using the Filter in the Form Properties happens client-side. I will have many invoices so I want the filtering to be done server-side; that's why I'm using sql arguments.

      Comment


        #4
        Re: How do I suppress the prompt "specify Arguement Values"

        On it is a button, that Opens the form PrintInvoices
        And what did you specify as the options for this button.

        active-linked table
        I'm not sure you can do any server-side processing with an active link table. All the options are probably set in the table definition.

        I just looked at the active link table creation genie and noticed.

        When to Use Arguments
        Use arguments when you want to specify values in your SQL statement at run-time.
        So if you want to use arguments you have to live with the prompting.
        There can be only one.

        Comment


          #5
          Re: How do I suppress the prompt "specify Arguement Values"

          The genie says, "You can include as many arguments in your SQL as you want. At run-time, if values have not been supplied for any of the arguments, Alpha Anywhere will display a dialog box prompting for argument values."

          I take this to mean that if I can supply the values for the arguments, then I won't see the prompt.

          In the OnInit of the form, I put this...

          dim args as SQL::Arguments
          args.add("doNew", "no") or args.set("doNew", "no")

          I thought that would supply the arguement and suppress the prompt. In effect, the result set would be instantiated but with no data. Then after the user let's me know which invoices to print, I would reset the arguments and requery the result set.

          I have a report with the same table as its data source. If I select the report and do a preview, then the Specify Argument Values appears, as it should.

          If I open the form, answer the questions about which invoices to print, and then click on OK, which report.prints the report, then I don't get asked to Specify the Arguments, because they were set in the OnPush of the OK button.

          This is my code nin the OnPush...
          dim args as SQL::Arguments
          args.add("doNew", "no")
          dim reportName as c = "InvoicesClients"
          report.preview(reportName, "", "", .f., .f., args)

          So I think my problem is that I don't where, earlier than OnInit of the form, I can set the arguments.

          If I can pass the args to the print, then maybe I can pass them to the form.

          Comment


            #6
            Re: How do I suppress the prompt "specify Arguement Values"

            <Form> as P = FORM.VIEWQUERIED( Form_Name as C [, Filter_Expn as C [, Order_Expn as C [, Style as C [, Horizontal_Position as N [, Vertical_Position as N [, IsBaseQuery as L [, Arguments as SQL::Arguments ]]]]]]] )

            Looks like the only place I see to do that. Simply opening the form doesn't accept arguments.
            There can be only one.

            Comment


              #7
              Re: How do I suppress the prompt &quot;specify Arguement Values&quot;

              WHERE :doNew = 'yes' and dTrnInvPrinted = '1900-01-01'
              if you do not have this in sqlquery statement filtering and then define the filter in the form and in the action script to open the report if you define those fields to match the report
              what will happen?
              thanks for reading

              gandhi

              version 11 3381 - 4096
              mysql backend
              http://www.alphawebprogramming.blogspot.com
              [email protected]
              Skype:[email protected]
              1 914 924 5171

              Comment


                #8
                Re: How do I suppress the prompt &quot;specify Arguement Values&quot;

                Way to go, Stan!

                In the button to open the form, I put this xBasic code...

                dim args as SQL::Arguments
                args.add("doNew", "no")
                dim pForm as P = FORM.VIEWQUERIED( "invoicesClientsPrint", "", "", "dialog", "20", "20", .t., args)
                pForm.close(.t.)

                invoicesClientsPrint opens without the prompt and all is well.

                In answer to your question, Gandhi, what you say will work. But, the filter is applied at the workstation. So if you have ten thousand invoices but want to print invoice #18384, all ten thousand are sent to the client and then the filter invoiceNumber=18384 is applied. By using sql arguments, the sql server will select just invoice #18384 and send only it down the line.

                Filters work just fine for local DBFs, because when a DBF table is opened the record pointer just sits there. No data is actually transferred to the workstation. Then the filter is set and the record pointer moves to the first record to satisfy the filter. The contents of the index are sent to the workstation so that it can read through the index until it finds the first record to match the filter. But, that's not as slow as sending all ten thousand records.

                Comment

                Working...
                X