Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting Fiscal Months as a Parameter

Status
Not open for further replies.

plochrie

Technical User
Dec 26, 2006
1
US
I read through prior posts and did not find (or did not understand) a way to set up fiscal month as a parameter.

I am running Crystal 8 drawing my data from a SalesLogix database running SQL. (I hope that is technical enough.)

What I want to do is to allow a user to pick a fiscal month as a parameter. (ie. Jan06, Feb06, etc.) and then only have records with a start date in that fiscal month show in the report. If they picked Dec06 I would want all records that started between 11/27/06 and 12/31/06. All our date fields seem to be date-time fields.

Setting a string parameter for them to pick is easy. (Should I?) How do I then take the fiscal month they picked and limit the records they see.

Thanks,
plo
 
DatePart will let you find week or year using your own start of year - look up the Help on this.

You should be able to do this with a parameter value, though I've never tried it.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
why not start a formula field to describ the fiscal month
ie
if month="JAN" then ondate field =>'01/01/06' and ondate =<1/31/06 else
if month ="FEB" then.....


you could first choose the year and place that in the date
fiscalmth=
if ?fiscal time ="Jan" then ondate >= date(year,01,01) and ondate <= date(year,01,31) else
if ?fiscal time ="Feb" then ondate >=date(year,02,01) and ondate <= date(year,02,28) else.....

year would be a formula mid(?fiscal time,4,2) this would give you the year from the question fiscal time.

contact me if you like for more help.
jillm@ccc24k.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top