Alpha Video Training
Results 1 to 7 of 7

Thread: Using One Button to Query and Print

  1. #1
    Member
    Real Name
    Rodney Efird
    Join Date
    Apr 2000
    Posts
    137

    Default Using One Button to Query and Print

    Hello all,

    I am looking for a way to use one button to run a query and then print the results of the query. I am sure this has been done but I myself cannot determine the course of action to take.

    Thanks to all and Happy Holiday

    Rodney

  2. #2
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    25,119

    Default RE: Using One Button to Query and Print

    Rodney,

    I'm not sure what you mean by "print the results of the query". Do you want to print a report based on the results of the query or do you want to print the browse after the query is run?

  3. #3
    Member
    Real Name
    Rodney Efird
    Join Date
    Apr 2000
    Posts
    137

    Default RE: Using One Button to Query and Print

    I am sorry. Yes print a report based on the query.

    thanks

    Rodney

  4. #4
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    25,119

    Default RE: Using One Button to Query and Print

    Rodney,

    I would place a new button on a form, specify multple actions, edit the button, insert command, specify the saved query to run (or perform the query in xbasic in an insline xbasic command), insert command, specify print layout, choose the report you want. In the detail section for the report check "current selection of records".

    You could also just make the button do the printing and in the filter for the detail section make the filter do what your query does.

    Stan

  5. #5
    Member
    Real Name
    Rodney Efird
    Join Date
    Apr 2000
    Posts
    137

    Default RE: Using One Button to Query and Print

    Due to the number of records I need to do the query. Following your suggestions I cannot enter the information into the query box that appears before the report prints and then an error is created.

    I cannot specify in the filter as it is too slow. This I have aready and in faxct am using a simialar approach.

    Thanks for the help

    Rodney

  6. #6
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    25,119

    Default RE: Using One Button to Query and Print

    Tell us more about your query. There have been recent postings concerning complicated queries and how to work around them.

    If you are querying for records and need to specify a "group" of records by something like

    value=1.or.value=15.or.value=899.or.................

    consider adding a field (say named qualifier) to your table and giving all records for one such "group" the same entry in the new field. Then your query is reduced to

    qualifier = value for group in new field

    Hope this helps.

    Stan

  7. #7
    Member
    Real Name
    Rodney Efird
    Join Date
    Apr 2000
    Posts
    137

    Default RE: Using One Button to Query and Print

    Hi again,

    I worked around the query problem and it is woking fine. I do thank you for your assistance.

Similar Threads

  1. Print Button on a form
    By Rob C in forum Alpha Five Version 5
    Replies: 5
    Last Post: 01-29-2004, 02:23 PM
  2. Using a button to print
    By David Darby in forum Alpha Five Version 4
    Replies: 4
    Last Post: 10-14-2002, 07:42 AM
  3. Button to Print a Report?
    By Bob Elliott in forum Alpha Five Version 4
    Replies: 1
    Last Post: 05-24-2002, 05:28 AM
  4. Frozen button after print
    By Greg Fong in forum Alpha Five Version 4
    Replies: 3
    Last Post: 08-16-2001, 04:37 PM
  5. Need help with a print button script.
    By George BVI in forum Alpha Five Version 4
    Replies: 1
    Last Post: 05-22-2000, 01:08 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •