Selectable date range
Moderator: Renato
-
- Super User
- Posts: 126
- Joined: Fri Jan 03, 2020 3:24 pm
- Are you a spam bot?: No
Selectable date range
Any way to make a selectable date range for reports in the customizable General Reports Manager (similar to the built-in reports)?
-
- Developer
- Posts: 345
- Joined: Fri Aug 21, 2020 5:44 pm
- Are you a spam bot?: No
Re: Selectable date range
Use &from_date and &end_date in your SQL.
Not sure if any of the example reports use this, but the AccountBalances shows how to use a single date - so you will get help looking at that for what to do in SQL and template as neccessary
https://github.com/moneymanagerex/gener ... ntBalances
E.g.
Not sure if any of the example reports use this, but the AccountBalances shows how to use a single date - so you will get help looking at that for what to do in SQL and template as neccessary
https://github.com/moneymanagerex/gener ... ntBalances
E.g.
Code: Select all
select ACCOUNTID, STATUS
, (case when TRANSCODE = 'Deposit' then TRANSAMOUNT else -TRANSAMOUNT end) as TRANSAMOUNT
, TRANSDATE
from CHECKINGACCOUNT_V1
where STATUS <> 'V'
and TRANSDATE >= '&from_date'
and TRANSDATE <= '&end_date'
-
- Super User
- Posts: 126
- Joined: Fri Jan 03, 2020 3:24 pm
- Are you a spam bot?: No
Re: Selectable date range
Thank you for that! Here's what I found so far.
Any idea what I'm missing?
- You must include the single quotes around '&from_date' and '&end_date' to avoid an SQL error (like your example showed, but I accidentally omitted them my first time).
- You must add both the '&from_date' and '&end_date' to the SQL for the date menu to appear in Money Manager EX (I initially experimented with just the '&from_date' but that doesn't do anything).
Code: Select all
WHERE
wd_data.date >= '&from_date'
AND wd_data.date <= '&end_date'
ORDER BY date ASC;
-
- Developer
- Posts: 345
- Joined: Fri Aug 21, 2020 5:44 pm
- Are you a spam bot?: No
Re: Selectable date range
My error, it should be begin_date and end_date
-
- Developer
- Posts: 1535
- Joined: Sat Dec 06, 2008 2:27 pm
- Are you a spam bot?: No
- Location: Sankt-Petersburg, Russia
-
- Super User
- Posts: 126
- Joined: Fri Jan 03, 2020 3:24 pm
- Are you a spam bot?: No
Re: Selectable date range
That did the trick! Thank you!