I am in a CR 9 and CE 9 environment.
I have a report that deals with fiscal month / year data.
The report works great, but I need to set it so that the report KNOWS (at runtime) what fiscal year and month the CURRENT date is in. (I need this so that I can tell the system to go and pull 3 fiscal months of data before and 3 after todays date so the graphs are correct).
Anyway, I am having trouble with how to get the fiscal year and month correct for this. Our setup is totally wierd, and our fiscal year does not always end or start on the same date every year. (We follow April to March but...we use a
5-4-4 cycle)
Our database has a "calendar table" in it and our DBA manages that - and I can get to the table, but am unsure how to pull this out....
Here is what the table looks like:
TABLE = FCAL
FIELDS =
cldnr_yr
period_end_dt_01
period_end_dt_02
period_end_dt_03
period_end_dt_04
(there are 12 of these, one for each period)
The end date in each of these is the end date for that period - meaning we don't hold the start date for the period in there, but it can be calculated by (-1)...
I need a loop of some sort that will go in and do :
1. for this calendar year (from currentdate)
2. loop through each of these fields and figure out where the date falls, and then spit out whatever period I am in.
Am I WAY off track here? Am I making this harder than it needs to be?
LMC cryerlisa@hotmail.com
select * from Management where proj_mgmt_skills <> NULL
0 records returned
I have a report that deals with fiscal month / year data.
The report works great, but I need to set it so that the report KNOWS (at runtime) what fiscal year and month the CURRENT date is in. (I need this so that I can tell the system to go and pull 3 fiscal months of data before and 3 after todays date so the graphs are correct).
Anyway, I am having trouble with how to get the fiscal year and month correct for this. Our setup is totally wierd, and our fiscal year does not always end or start on the same date every year. (We follow April to March but...we use a
5-4-4 cycle)
Our database has a "calendar table" in it and our DBA manages that - and I can get to the table, but am unsure how to pull this out....
Here is what the table looks like:
TABLE = FCAL
FIELDS =
cldnr_yr
period_end_dt_01
period_end_dt_02
period_end_dt_03
period_end_dt_04
(there are 12 of these, one for each period)
The end date in each of these is the end date for that period - meaning we don't hold the start date for the period in there, but it can be calculated by (-1)...
I need a loop of some sort that will go in and do :
1. for this calendar year (from currentdate)
2. loop through each of these fields and figure out where the date falls, and then spit out whatever period I am in.
Am I WAY off track here? Am I making this harder than it needs to be?
LMC cryerlisa@hotmail.com
select * from Management where proj_mgmt_skills <> NULL
0 records returned