3 Replies Latest reply on Feb 27, 2015 6:28 AM by JamesCopland

    User Report Selection

    JamesCopland

      Title

      User Report Selection

      Post

      Hi, could anyone please help me with the following.

      1. I have a script that runs a report and outputs the results to excel. This is based on a 'Period Field' e.g. 01/2014, 02/2014 etc. 
      2. Prior to running the report, I need the user to select the period they are interested in and only output the records that relate to their selected period. , This will vary each time and can run several times a week.
      3. I just can't figure out a way to achieve this, any help would be appreciated , thanks.

        • 1. Re: User Report Selection
          Mark_M

          >

          I usually have a tblGlobal (Global table) where I keep global fields to store information temporarily for use by scripts.

          You can script the find function and activate it with a "Data Range Search" button.  The Find Script uses a Custom Dialog box

          In general terms have the script do the following:

                 
          1. Clear the globals (Set Fields = "")
          2.      
          3. Use the Custom Dialog box step to get the inputted dates.  You can provide instruction text and then on the "Input Fields" tab have input one go to the starting date and input field two go to the ending date.
          4.      
          5. Error trap the entries.  By that I mean that neither date is blank and that the start date is less than the ending date.  For each test (using an "IF" test) if true open a custom dialog to inform the user of the error and then "Exit Script"
          6.      
          7. If their are no errors you can then enter Find Mode and use the globals to set the range you need in the find.

           

          >>>>

          • 2. Re: User Report Selection
            philmodjunk

            For examples of such scripted finds, See: Scripted Find Examples

            • 3. Re: User Report Selection
              JamesCopland

              Thank you Mark & Phil for your suggestions.  I will try these ideas and I'm sure both will be great, thanks again