Alpha Video Training
Results 1 to 12 of 12

Thread: Print Genie's conditions

  1. #1
    Member
    Real Name
    David Gilbert
    Join Date
    Dec 2006
    Location
    Nanuet New York
    Posts
    61

    Default Print Genie's conditions

    I have a report that needs to be printed out monthly. Is there a way to have a form that has a month and year field on it that can be used by the Print Genie as input for the two "conditions" which are "anded" in the Genie? What I want I guess is to use the print Genie but send it its input via a form. Is this possible? Thanks for any help.

  2. #2
    "Certified" Alphaholic Ted Giles's Avatar
    Real Name
    Ted Giles
    Join Date
    Aug 2000
    Location
    In the Wolds, Louth, Lincolnshire, UK
    Posts
    4,291

    Default Re: Print Genie's conditions

    To clarify.
    Do you want a report to run every month? Then use Timer.
    Where does the Form come in?
    Ted Giles
    Example Consulting - UK
    .

    http://ec12.example-software.com//
    See our site for Alpha Support, Conversion and Upgrade.

  3. #3
    Member
    Real Name
    David Gilbert
    Join Date
    Dec 2006
    Location
    Nanuet New York
    Posts
    61

    Default Re: Print Genie's conditions

    Ted, Yes the report needs to be printed each month to send to people who owe the business money. I could have the person (secretary) who prints out the reports each month go through the process of the Print Genie where she would have to choose the table, field for each of the conditions (month, year) and make sure that the "and" radio button was chosen, and then have the genie print the report. I wanted to save her the process of doing all that, as well as the possibility of mistakes each time she did the Genie. So I thought if I could pass in the two "conditions" (month, year) from a form, I could then have the report genie do the rest. I have an older build of Alpha Anywhere V12 and do not know what "Timer" is. Can you instruct me? Thanks for your reply.

  4. #4
    "Certified" Alphaholic Ted Giles's Avatar
    Real Name
    Ted Giles
    Join Date
    Aug 2000
    Location
    In the Wolds, Louth, Lincolnshire, UK
    Posts
    4,291

    Default Re: Print Genie's conditions

    That should be comparatively easy, no need to have an automated timer running.
    So, each month, select all open clients with outstanding debt who have not made a payment. Print outstanding balance and payment due.
    It's not quite as simple as you might think though.
    If you have part payment part way through a month, what do you want to do?
    I presume you are creating a Statement for the client who has not paid?
    So if your accounts lady can press a button at the end of the month, the statements can be printed.
    Ted Giles
    Example Consulting - UK
    .

    http://ec12.example-software.com//
    See our site for Alpha Support, Conversion and Upgrade.

  5. #5
    Member
    Real Name
    David Gilbert
    Join Date
    Dec 2006
    Location
    Nanuet New York
    Posts
    61

    Default Re: Print Genie's conditions

    Ted, I understand that each month I need to select all open clients with outstanding debt. My problem is that once I have done that, how do I pass the chosen month and year into the Print Genie. It feels like I need to create two variables out of the choices made (month, year) and somehow pass them into the code created by the Print Genie. Is there some way to do that? Thanks for your help.

  6. #6
    "Certified" Alphaholic Ted Giles's Avatar
    Real Name
    Ted Giles
    Join Date
    Aug 2000
    Location
    In the Wolds, Louth, Lincolnshire, UK
    Posts
    4,291

    Default Re: Print Genie's conditions

    From what you say, the way I would do this is to;
    Create a Query which will identify the outstanding records - look at the Date section in the help, but see below. The Query Builder is easy to use.
    Run the Query
    In Action Scripting - print records selected by a query.
    These two processes can be put under one button and run sequentially.
    So, once the query has been run and the outstanding records can be printed.
    You can do some fancy stuff easily to show how many records there are in the query too.

    When the form is reopened, you just need to Show All Records to disconnect the query.

    If you are still stuck, I will build a working example tomorrow.

    Try these in the Interactive Window
    ?date()
    = {07/05/2019}

    ? year(date())
    = 2019

    ? MONTH(DATE())
    = 5

    ? DAY(DATE())
    = 7

    ' Example

    dim lastpay as d ' this should be a field in your table.
    lastpay = {01/01/1900}

    ? month(lastpay)
    = 1

    ? day(lastpay)
    = 1
    Ted Giles
    Example Consulting - UK
    .

    http://ec12.example-software.com//
    See our site for Alpha Support, Conversion and Upgrade.

  7. #7
    "Certified" Alphaholic MoGrace's Avatar
    Real Name
    Robin
    Join Date
    Mar 2006
    Location
    Los Angeles
    Posts
    3,595

    Default Re: Print Genie's conditions

    Now change Ted's script to the MM/DD/YYYY format used for your dates here in the USA
    Robin

    Discernment is not needed in things that differ, but in those things that appear to be the same. - Miles Sanford

  8. #8
    Member
    Real Name
    David Gilbert
    Join Date
    Dec 2006
    Location
    Nanuet New York
    Posts
    61

    Default Re: Print Genie's conditions

    Ted, Creating a query and saving it just gives a one time saved query. Next month, the secretary will have to create another query that changes the month but saves the same year. I was hoping that there might be a way to just pass the "values" into the query genie via a form. If the query method is all there is, I could teach her how to use the genie and pray for the best. Thanks for your help.

  9. #9
    Member
    Real Name
    Jo Hulsen
    Join Date
    Mar 2006
    Location
    The Netherlands
    Posts
    331

    Default Re: Print Genie's conditions

    I assume that the report will be printed in the beginning of next month. It can be fully automated by retrieving start and end dates of the previous month and use them as variables in your script.
    Some examples based on the current date:
    ?date_FirstDayOfMonth(Date())
    = {01-05-2019}
    ?date_LastDayOfMonth(Date())
    = {31-05-2019}
    ?date_FirstDayOfPreviousMonth(Date())
    = {01-04-2019}
    ?date_LastDayOfPreviousMonth(Date())
    = {30-04-2019}
    Jo Hulsen
    Dommel Valley Solutions
    The Netherlands

  10. #10
    "Certified" Alphaholic Ted Giles's Avatar
    Real Name
    Ted Giles
    Join Date
    Aug 2000
    Location
    In the Wolds, Louth, Lincolnshire, UK
    Posts
    4,291

    Default Re: Print Genie's conditions

    See if this gives you some ideas. It is based on a 30 day credit cycle. Change that as you wish.
    If you want to enter a date to compare non-payment to, then check out the date options in the help.
    Statements are usually 30, 60, 90 days reminders so quite easily built.

    The invoices have a range of dates and one has been paid. Click the Statements button and invoices older than 30 days from the current date but not paid will show. As will the Show All button.

    PS. I have added some "colour frippary" you might want to look at.

    Statements.zip
    Ted Giles
    Example Consulting - UK
    .

    http://ec12.example-software.com//
    See our site for Alpha Support, Conversion and Upgrade.

  11. #11
    Member Tim Sutherland's Avatar
    Real Name
    Tim Sutherland
    Join Date
    Jul 2000
    Location
    Michigan
    Posts
    287

    Default Re: Print Genie's conditions

    Is this what you are attempting to do?

    Statements _test.zip

  12. #12
    Member
    Real Name
    David Gilbert
    Join Date
    Dec 2006
    Location
    Nanuet New York
    Posts
    61

    Default Re: Print Genie's conditions

    Ted and Tim

    Thank you both for your help. Tim I think your example comes the closest to what I was trying to do. I will examine both of your examples further. Thank you both again for your help.

    david

Similar Threads

  1. Replies: 1
    Last Post: 01-18-2016, 12:48 PM
  2. Is there a way to Print A5w page under following conditions?
    By Fulltimer in forum Application Server Version 11 - Web/Browser Applications
    Replies: 1
    Last Post: 01-30-2013, 05:12 PM
  3. Query Genie conditions
    By Gary Phillips in forum Alpha Five Version 5
    Replies: 5
    Last Post: 12-13-2002, 03:41 AM
  4. Print Genie
    By Sigrist in forum Alpha Five Version 5
    Replies: 3
    Last Post: 10-19-2002, 10:50 PM
  5. Entering logical conditions in Query Genie
    By Stephen Williams in forum Alpha Five Version 4
    Replies: 3
    Last Post: 09-02-2001, 11:47 AM

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
  •