Alpha Video Training
Results 1 to 9 of 9

Thread: Date Variable Search

  1. #1
    Ken Fleming
    Guest

    Default Date Variable Search

    I searched this message board for answers to this that I can use but came up blank. Not that I did not find anything but something I can understand for I am new at A5. I need something that will let me run a search for a date with beginning and ending dates. I read and copied off several scripts but where to put them is a complete mystery to me. Tried every posted zip for an answer but nothing works for what I need. I have one that works in an Application that works that someone sent me but getting that into my own, I just cannot follow the procedure they used. I need something simple, tried a query that works to a browse but will not work when I print to a report for it gets all the data in the table. Tried calucated but got errors on that too. I am at a total loss at what to do to get the results. I know it must be simple but I am MISSING it somewhere. If it possible for someone to post a Working SIMPLE Example as exactly what to it would me MUCH Appreciated.

    Ken

  2. #2
    Member
    Real Name
    Fred Daniel
    Join Date
    Jun 2000
    Location
    Birmingham, Alabama
    Posts
    302

    Default RE: Date Variable Search

    I missed that also. In the older version of Alpha4v6 and 7 it was easy to creat a form that poped up and allowed the user to enter a begining date and an ending date which then was placed in variables such as(Begining Date: and Ending Date:) and then you copuld run a report that would filter for those dates entered by the end user. It seems that Alpha should have created a Geni for mthat one because it is the heart of database reporting. It should be a standard function. I've always thought that Alpha's documentation was very weak in that area.

  3. #3
    Member
    Real Name
    Craig Schumacker
    Join Date
    May 2000
    Posts
    700

    Default RE: Date Variable Search

    Ken and Fred:

    It's so easy, you'll probably kick yourself! I remember experiencing the very same feeling a few years ago. I remember the feeling so strongly, I thought I'd take a shot at explaining how it's done.

    There are two examples in the attached example.

    To preview example1, click on the reports tab on the control panel, then double click on the Example1 report.

    Example1 sets the variables within the report session (They exist for the life of report). The variables are created in report design mode. Select the 'Report' heading on the menu bar at the top. Then select 'the 'Detail properties' choice from the drop down. Click on the 'Records' tab. Variables are made by DRAGGING the from the 'Var' column to the EXPRESSION box.

    To illustrate Example2, go to the 'Code' tab on the control panel, and double click on the Example2 script to run it.

    Example2 uses the Autoexec script to create two global variables. They, being global, are available anywhere within A5 for the life of the current database session. We the use the script EXAMPLE2 to capture the character version of the date. In the filter section of the Example2 report, we use a similar expression to example1, but need to convert the character version of the date to a date format by using CTOD(), which is 'character to date'.

    Any questions? Feel free to ask!

    Craig

  4. #4
    Member
    Real Name
    Craig Schumacker
    Join Date
    May 2000
    Posts
    700

    Default RE: Date Variable Search

    ...ooops...

    I forgot that this board eats certain characters...

    Variables are made by DRAGGING the from the 'Var' column to the EXPRESSION box.

    should read:

    Variables are made by DRAGGING the "ask user" from the 'Var' column to the EXPRESSION box.

    Hopefully, this will reflect properly!

    Craig

  5. #5
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,311

    Default RE: Date Variable Search

    Ken & Fred,

    To supplement what Craig has posted here's an example that shows you 4 different ways to call a report that is filtered by a range of dates.

    Have fun tearing it apart to see how it's done.

    The attachment is a self-extracting zip file. Save it to a separate folder, do permit it to extract files into your development folder.

    -- tom

  6. #6
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,311

    Default RE: Date Variable Search

    Ken & Fred,

    To supplement what Craig has posted here's an example that shows you 4 different ways to call a report that is filtered by a range of dates.

    Have fun tearing it apart to see how it's done.

    The attachment is a self-extracting zip file. Save it to a separate folder, do permit it to extract files into your development folder.

    -- tom

  7. #7
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,311

    Default RE: Date Variable Search

    'do permit'

    should be

    'do NOT permit'


    -- sorry 'bout that.

    -- tom

  8. #8
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,311

    Default RE: Date Variable Search

    For those that don't want to download the zip, the four methods are:

    1) embedding a filter in the report, using global variables that are populated in the form;

    2) running a QBF with the form, and then calling an unfiltered version of the report;

    3) running a table query, using variables input through the form, completely by means of an xbasic script, and then calling the unfiltered version of the report;

    4) embedding the filter expression in the report preview command, using variables populated on the form.

    -- tom

  9. #9
    Ken Fleming
    Guest

    Default RE: Date Variable Search

    THANKS!!!! Fellows for the tremendious responce. Like Fred said it was SO EASY in A4. It was in the training manual explained very well. The manuals are so vague for me. I will definately take a GOOD Through look but not tonight. I have them downloaded. Will take look tomorrow afternoon after church.

    You are all great.

    Ken

Similar Threads

  1. Default Date in Search Bar
    By Rich Hartnett in forum Web Application Server v6
    Replies: 0
    Last Post: 07-07-2005, 01:54 PM
  2. date variable
    By Alan Lee in forum Alpha Five Version 5
    Replies: 1
    Last Post: 02-26-2004, 07:14 PM
  3. Date from Variable
    By Amateur in forum Upgrading to Alpha Five from Alpha Four
    Replies: 5
    Last Post: 01-11-2004, 07:21 AM
  4. variable to date
    By russ Boehle in forum Alpha Five Version 5
    Replies: 7
    Last Post: 02-12-2003, 07:44 AM
  5. Blank Date Search
    By Ron Shields in forum Alpha Five Version 4
    Replies: 4
    Last Post: 07-26-2001, 06:23 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
  •