Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
This week, This Month, This Qtr, This Year Drop down...
Message
From
10/05/2007 01:54:30
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01223987
Message ID:
01224046
Views:
14
>>It takes about 10 minutes to write this class. Most likely, some guys (you know names) already doing it now. I could do it to, if not leaving in 5 minutes.

How about using data driven aproach instead of coding it via class ?
Field      ValueToStore 
--------------------------------
RangeCode  QT1,LQT etc.
RangeDesc  First Quarter,LastQuarter etc
RangeFrom  FirstDayOfThePeriod
RangeTo    LatDay Of the Period
Then all combo has to do is choose between
range table records, while you pick them up and use as you are pleased.
If it is for generic previous, then all you have to do is figure out what is current week,qt or month according to current date and then look for one before that. Assuming that all periods likely to be searched are already stored in that table.

Additionally you can let user define/store for later use his own custom date ranges. Or maybe even store previosely used data ranges and share them between reports.

Just another way to skin the cat :)

>
>I can do to, but I don't want to re-invent the wheel. Perhaps all we need to do is ask Kevin a permission to publish it.
>
>
>>
>>>Yes, we have this class at my previous work. It's actually part of MereMortals framework (code by Kevin McNeish, so I don't think I can publish it here).
>>>
>>>>Has anyone already done a class for this? It is inspired from QuickBooks for choosing a data range.
>>>>
>>>>I would like a dropdown listbox that will allow the user to choose:
>>>>
>>>>This Week
>>>>This Month
>>>>This Quarter
>>>>This Year
>>>>Last Week
>>>>Last Month
>>>>Last Quarter
>>>>Last Year
>>>>
>>>>The class would store the dates in this.date1 and this.date2.
>>>>
>>>>
>>>>The "Week" should run Monday - Sunday
>>>>Month and quarter are the calendar month and qaurter.
>>>>
>>>>It sure would save me a ton of time.
*****************
Srdjan Djordjevic
Limassol, Cyprus

Free Reporting Framework for VFP9 ;
www.Report-Sculptor.Com
Previous
Reply
Map
View

Click here to load this message in the networking platform