Limit OneCategoryList Report to 2015 Transactions

Build and share your cool customized reports built w/ one sql, Chart.js and Lua

Moderator: Renato

Post Reply
kurtisamundson
New MMEX User
Posts: 2
Joined: Thu Feb 04, 2016 3:47 pm
Are you a spam bot?: No

Limit OneCategoryList Report to 2015 Transactions

Post by kurtisamundson »

I'm using the OneCategoryList report to create a list of donations to our organization from a single source. I'd like to modify the report to only display transactions in a set category from 2015. Currently, it is displaying transactions from a category without any limitations by date. Anyone have suggestions on how I can accomplish this?
kurtisamundson
New MMEX User
Posts: 2
Joined: Thu Feb 04, 2016 3:47 pm
Are you a spam bot?: No

Re: Limit OneCategoryList Report to 2015 Transactions

Post by kurtisamundson »

I found this code snippet but I don't know how to modify the existing SQL code to make it work. Or if it is even the right code that I'm looking for.

Code: Select all

declare@startDate varchar(20)
declare @endDate varchar(20)
set @startDate = '01/01/2015'
set @endDate = '12/31/2015'

-- test what are the start and end dates
select min(date),max(date) from view_Inspections
where date >= @startDate
and   date < @endDate
Nikolay
MMEX Developer
Posts: 1535
Joined: Sat Dec 06, 2008 2:27 pm
Are you a spam bot?: No
Location: Sankt-Petersburg, Russia

Re: Limit OneCategoryList Report to 2015 Transactions

Post by Nikolay »

where categ_id=1 /*category ID*/ and subcateg_id=1 /*subcategory ID*/And c.transdate > strfdate ('31-12-2014) and
C.translate < strfdate ('01-01-2016')Something like this
Nikolay
MMEX Developer
Posts: 1535
Joined: Sat Dec 06, 2008 2:27 pm
Are you a spam bot?: No
Location: Sankt-Petersburg, Russia

Re: Limit OneCategoryList Report to 2015 Transactions

Post by Nikolay »

where categ_id=1 /*category ID*/ and subcateg_id=1 /*subcategory ID*/And c.transdate > strfdate ('31-12-2014) and
C.translate < strfdate ('01-01-2016')Something like this
Post Reply