Changes

Jump to: navigation, search
no edit summary
'''Q: How do I create a report that returns within a range of the user input?

''A: You need to do the following steps to configure this.

1. Setup your report, and use the following on your desired date input field.

[[image:Report_last2m.jpg]]

2. For '''Column 5''', use the following code.

The code inside 1 is: <pre>date_format([this],'%Y-%m')</pre>
The code inside 2 is: <pre>date_format(date_sub(???, interval 2 month),'%Y-%m')</pre>

For '''Column 6''', display your date field.

Using this syntax, upon the user input it will subtract 2 months.

The benefit of using syntax like this is that if you run this report in January, it will return results from the previous year.

'''*Note''': Similar syntax can be used with the date_add function. You could just as easily broaden your translation to be in days to obtain a more accurate result. E.g. 90 days vs 3 months.

[[Category:FAQ]][[Category:Reports]]
214
edits

Navigation menu