Date ranges on report
  • Garry
    Date ranges on report

    by Garry » Mon Aug 14, 2006 3:15 pm

    Hi,

    I've used the Questions Wizard to create two date questions when I run a report I've created using the Report Wizard. When the report is run the dates presented are blank and I have to fill them in. I notice in Capital most in built reports prompt you with the date range starting from the first day of last month to the last day of last month. How do I do the same with Visual Builder?
  • COBS Tech Support
    Posts:683
    Joined:Fri Sep 09, 2005 8:23 am

    by COBS Tech Support » Mon Aug 14, 2006 3:29 pm

    Load your report/form into the Visual Builder editor. Then from the main menu select Edit|Form Properties. Click on the Questions tab button. Select each question in turn and press Edit.

    For the start date the script inside the Variable Declaration box should look like this:

    Declare Answer1 Type Date
    Answer1 := MonthStart(DateFromMonth(Today(), -1))

    (If the variable name in Result In is not 'Answer1' change the above references from 'Answer1' to whatever matches the contents of this field.)

    For the end date the script inside the Variable Declaration box should look like this:

    Declare Answer2 Type Date
    Answer2 := MonthEnd(DateFromMonth(Today(), -1))

Who is online

Users browsing this forum: No registered users and 26 guests