on 11-20-2008 9:47 PM
This may be very simple, but I'm having a total brainfart today so here I am...
I have two fields, one is a MONTH field which is obviously a 1 to 2 digit number field, and a YEAR field; a 4 digit number field.
I have 4 parameters that will utilize the MONTH and YEAR fields as a selection criteria. Two paramters are for Start-Month and Start-Year, and the other two; End-Month and End-Year.
Basically, I want users to be able to select everything between the Starts and the Ends.
The problem is, for example, if I put in the criteria as starting 02 (Feb) as Start-Month, 2007 as Start-Year, and 11 (Nov) as End-Month, 2008 as End-Year, it will select everything between February 2007 - December 2007, then February 2008 - November 2008. The problem lies in the fact that it will skip January 2008 since, technically, it is not defined according to my Select Expert.
I'm pretty sure this is a simple solution to get the range I want but I just can't think today for some reason.
Any suggestions?
Currently
({table.MONTH} >= {?Start-Month} and {table.YEAR} >= {?Start-Year}) and
({table.MONTH} <= {?End-Month} and {table.YEAR} <= {?End-Year})
Try this
({table.MONTH} >= {?Start-Month} and {table.YEAR} >= {?Start-Year}) or
({table.MONTH} <= {?End-Month} and {table.YEAR} <= {?End-Year})
Regards,
Raghavendra
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you. I knew it was some simple logic I missed. It'll work for now for a 2 year period but I'll worry about when we get to more than 2 year data.
Thanks again.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.