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!

Pls Help Again with Data Range Formula Cr11 1

Status
Not open for further replies.
May 5, 2005
39
US
Hi all,

Trying to get these date range formualas straight in my head is very challenging. I am used to only doing formualas with one or two dates and not a range of dates so I apoligize for the many questions I have.

Anyhow, I am creating a report that is going to show sales. This report will have one column for the previous month and another column for the current month. The next column will be Current Year to date, and the other field will be previous year ytd.

My data looks somewhat like this:

CustName sale CloseDate
ab compa 5000 1/15/08
cd compa 4000 12/31/07
ef copa 3000 11/15/07
gd cop 2000 09/06/06

I have tried to make a formula like this but it hasn't worked.

If({tbl.CloseDate}) is between 1/1/07 and 1/31/07 then {tbl.Sale} else 0.

Does Crystal recongnize what I am asking it to do or do I need to format it a different way.

Any help would be most apppreicated.

Thanks
 
If {tbl.CloseDate} in date(2007,1,1) to date(2007,1,31) then {tbl.Sale} else 0.



Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports

"What version of URGENT!!! are you using?
 
Okay, I now have another dilema that is somewhat related to the date range question above, but it is a little more complex.

I have created a series of formulas based on the formula above and the dates I needed it for for my sale field. I was bascially looking at sales for different time periods. I also want to look at fees associated with the sales and that is a different number but within the same time period. There are also a number of other things I need to meassure within the same time period besides sales and fees.

Example:

CustName sale CloseDate fees NetRev
ab compa 5000 1/15/08 50 100
cd compa 4000 12/31/07 60 200
ef copa 3000 11/15/07 70 300
gd cop 2000 09/06/06 80 400

Okay, currentlyI have four different formulas for my sale field that shows 4 different date ranges current month, previous month, current year YTD, Previous Year, YTD.

I now need to do the same for fees and NetRev. Do I need to create 4 new formulas for my fees and 4 new formulas for NetRev or is there some kind of Crystal Formula out there that will allow me to define a variable for my dates so I don't have to create so many different formulas?

Does this make any sense, or is it wishful thinking on my part? I wouldn't mind making up so many formulas if I didn't have to change them each month.

I have been searching in google for the past 1/2 hour and am just as confused as when I began so advise would be appreciated as I have never done any variable formuals in Crystal before.

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top