![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
my scan is not working at all except to update the Month fields with $0.00 |
|
I am having a mental spiral down and need some help - Brain freeze... I'm pretty sure this is simple but I can't even get started I have: Code # bgnDate endDate dailyCost ( pre-calculated ) using SunDialServices DateTran.db for TheDate, MonthNumber, Day, DaysInMonth I have selected a subset of records from DateTran for the exact Day for every bgnDate with the above info I have selected a subset of records from DateTran for the exact Day for every endDate with the above info I have selected a subset of records from DateTran for every month (Day 1) between the bgnEnd and endDate via Code with the above info User will enter the bgn & end Dates. NEED TO scan PRIV tables to calculate money amounts via Code by Month to be stored in a WORK table. EX if Code = 040568 & bgnDate = 1/1/04 and endDate = 4/15/07 then Jan = dailyCost * ( 1/31 * 22 ) : the Jan tbl_field would have this amount for 2004 + 2005 + 2006 + 2007 ( dailyCost times Jan 1 divided by days in month times working days of 22 which is the # I was told to use ) Apr = dailyCost * ( 1/30 * 22 ) the Apr tbl_field would have this amount for 2004 + 2005 + 2006 + dailyCost * ( 15/30 * 22 ) for 2007 my scan is not working at all except to update the Month fields with $0.00 HELP ! HELP! HELP! |
#3
| |||
| |||
|
|
my scan is not working at all except to update the Month fields with $0.00 it's kinda hard to troubleshoot a scan that we can't see.. -- Steven Green - Waldorf Maryland USA Diamond Software Group http://www.diamondsg.com/main.htm Paradox Support & Sales - Corel CTech Paradox Diamond Sports Gems http://www.diamondsg.com/gemsmain.htm Sports Memorabilia and Trading Cards "JeaNette" <harrisjr (AT) bwsc (DOT) org> wrote in message news:44d8e482$1 (AT) pnews (DOT) thedbcommunity.com... I am having a mental spiral down and need some help - Brain freeze... I'm pretty sure this is simple but I can't even get started I have: Code # bgnDate endDate dailyCost ( pre-calculated ) using SunDialServices DateTran.db for TheDate, MonthNumber, Day, DaysInMonth I have selected a subset of records from DateTran for the exact Day for every bgnDate with the above info I have selected a subset of records from DateTran for the exact Day for every endDate with the above info I have selected a subset of records from DateTran for every month (Day 1) between the bgnEnd and endDate via Code with the above info User will enter the bgn & end Dates. NEED TO scan PRIV tables to calculate money amounts via Code by Month to be stored in a WORK table. EX if Code = 040568 & bgnDate = 1/1/04 and endDate = 4/15/07 then Jan = dailyCost * ( 1/31 * 22 ) : the Jan tbl_field would have this amount for 2004 + 2005 + 2006 + 2007 ( dailyCost times Jan 1 divided by days in month times working days of 22 which is the # I was told to use ) Apr = dailyCost * ( 1/30 * 22 ) the Apr tbl_field would have this amount for 2004 + 2005 + 2006 + dailyCost * ( 15/30 * 22 ) for 2007 my scan is not working at all except to update the Month fields with $0.00 HELP ! HELP! HELP! |
#4
| |||
| |||
|
|
I am having a mental spiral down and need some help - Brain freeze... |
|
I’m pretty sure this is simple but I can’t even get started I have: Code # bgnDate endDate dailyCost ( pre-calculated ) using SunDialServices DateTran.db for TheDate, MonthNumber, Day, DaysInMonth I have selected a subset of records from DateTran for the exact Day for every bgnDate with the above info I have selected a subset of records from DateTran for the exact Day for every endDate with the above info I have selected a subset of records from DateTran for every month (Day 1) between the bgnEnd and endDate via Code with the above info User will enter the bgn & end Dates. NEED TO scan PRIV tables to calculate money amounts via Code by Month to be stored in a WORK table. EX if Code = 040568 & bgnDate = 1/1/04 and endDate = 4/15/07 then Jan = dailyCost * ( 1/31 * 22 ) : the Jan tbl_field would have this amount for 2004 + 2005 + 2006 + 2007 ( dailyCost times Jan 1 divided by days in month times working days of 22 which is the # I was told to use ) Apr = dailyCost * ( 1/30 * 22 ) the Apr tbl_field would have this amount for 2004 + 2005 + 2006 + dailyCost * ( 15/30 * 22 ) for 2007 my scan is not working at all except to update the Month fields with $0.00 HELP ! HELP! HELP! |
#5
| |||
| |||
|
|
I have: Code # bgnDate endDate dailyCost ( pre-calculated ) |
#6
| |||
| |||
|
|
I have: Code # bgnDate endDate dailyCost ( pre-calculated ) |
|
oh well, I was hoping for help without having to DISPLAY my ineptness... :-( HTH !!! bgn_tbl.open(":PRIV:BDates") cFlow_tbl.open("CASHFLOW") cFlow_tbl.edit() scan bgn_tbl: st = bgn_tbl.StreetCode bgn = bgn_tbl.BgnDate end = bgn_tbl.EndDate day = bgn_tbl.Day last = bgn_tbl.DaysInMonth month = bgn_tbl.MonthNumber if cFlow_tbl.locate("StreetCode",st, "BgnDate", bgn, "EndDate", end) then st_c = cFlow_tbl.StreetCode bgn_c = cFlow_tbl.BgnDate end_c = cFlow_tbl.EndDate daily = cFlow_tbl.DailyCost if bgn_tbl.TheDate = bgn_c then if bgn_tbl.MonthNumber = 1 then cFlow_tbl.Jan = cFlow_tbl.Jan + (daily * (day/last)) * 22 endif ongoing for months 2 - 12... "Steven Green" <greens (AT) diamondsg (DOT) com> wrote: my scan is not working at all except to update the Month fields with $0.00 it's kinda hard to troubleshoot a scan that we can't see.. -- Steven Green - Waldorf Maryland USA Diamond Software Group http://www.diamondsg.com/main.htm Paradox Support & Sales - Corel CTech Paradox Diamond Sports Gems http://www.diamondsg.com/gemsmain.htm Sports Memorabilia and Trading Cards "JeaNette" <harrisjr (AT) bwsc (DOT) org> wrote in message news:44d8e482$1 (AT) pnews (DOT) thedbcommunity.com... I am having a mental spiral down and need some help - Brain freeze... I'm pretty sure this is simple but I can't even get started I have: Code # bgnDate endDate dailyCost ( pre-calculated ) using SunDialServices DateTran.db for TheDate, MonthNumber, Day, DaysInMonth I have selected a subset of records from DateTran for the exact Day for every bgnDate with the above info I have selected a subset of records from DateTran for the exact Day for every endDate with the above info I have selected a subset of records from DateTran for every month (Day 1) between the bgnEnd and endDate via Code with the above info User will enter the bgn & end Dates. NEED TO scan PRIV tables to calculate money amounts via Code by Month to be stored in a WORK table. EX if Code = 040568 & bgnDate = 1/1/04 and endDate = 4/15/07 then Jan = dailyCost * ( 1/31 * 22 ) : the Jan tbl_field would have this amount for 2004 + 2005 + 2006 + 2007 ( dailyCost times Jan 1 divided by days in month times working days of 22 which is the # I was told to use ) Apr = dailyCost * ( 1/30 * 22 ) the Apr tbl_field would have this amount for 2004 + 2005 + 2006 + dailyCost * ( 15/30 * 22 ) for 2007 my scan is not working at all except to update the Month fields with $0.00 HELP ! HELP! HELP! |
#7
| |||
| |||
|
|
Check | Check _b | Check _e | Check | |
|
=_b, <=_e | Check | Check | |
|
I am having a mental spiral down and need some help - Brain freeze... I’m pretty sure this is simple but I can’t even get started I have: Code # bgnDate endDate dailyCost ( pre-calculated ) using SunDialServices DateTran.db for TheDate, MonthNumber, Day, DaysInMonth |
#8
| |||
| |||
|
#9
| |||
| |||
|
|
I think you might be making this harder than it really is. You just need to make the calendar table do a little more work for you. As I understand it, you have Code bgnDate endDate dailyCost 040568 1/1/2004 4/15/2007 ? <= can you give an example? What do you want for a result? Show the fields and values those fields would have given the example data. Code Year Month Cost 040568 2004 Jan $a.00 040568 2004 Feb $b.00 ... 040568 2007 Mar $yy.00 040568 2007 Apr $zz.00 Something like that? Or maybe aggregated for all years for the given month? Your calendar table should have a flag for any attribute you care about. So if it is a working day/weekday/holiday/weekend day/whatever, you should be able to tell. Simplest approach is to build it with a column for each, and 1 for yes and 0 for no. Then you can do sums across days and get actual counts. In your case, maybe 22 has to be used as some sort of standard. Except 1/31*22*dailyCost for the entire month of January comes up to be less than 15/30*22*dailyCost for half the month of April. I don't get that formula. Anyhow, the whole point to a calendar table is to simplify this sort of thing. I suspect it could easily be done in a query if you have the needed date attributes. Answer the above questions and we can probably make this happen. -- Larry DiGiovanni Digico, Inc. IT Consulting and Staffing Solutions www.digicoinc.com Check out www.thedbcommunity.com for Paradox resources. |
#10
| |||
| |||
|
|
you got me thinking - maybe this pro-rate should be: Jan + dailycost * (( 31-1 +1) /31 * 22) |
![]() |
| Thread Tools | |
| Display Modes | |
| |