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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Select Data in a certain Date Range

Status
Not open for further replies.

bamitts

Technical User
Nov 18, 2001
12
US
I am very, very new to Crystal, so this may be a stupid question!!

I am trying to create a column of data (ActualCost) that was Incurred during a date set in a parameter (EndMonth). In SQL, I can see that there is data in the field, along with some NULLS, but in Crystal 8.0 I am getting all 0's.

AAAUUUUGGGGHHHH! Please help me!!

 
In the record selection formula, put logic like this:

{datefield} in {?Endmonth}

That will filter out all dates not in the paramater and leave you with the rest. Software Support for Sage Mas90, Macola, Crystal Reports and Goldmine
 
I am using a stored procedure that only has beginmonth and endmonth date fields in it. That must be my problem, in that I need another date field for the selection of the data?

Becky
 
Bamitts-

2 options. If you are using crystal V7 or above, make the parameter field a range field, and the logic I outlined above shuld work.

If you are using a version prior to seven, create 2 parameters, begdate & enddate, and use the following logic:

{Datefield} in {?begdate} to {?Enddate}

Note-I do not use stored procedures so everything I have pointed out is in crystal reports syntax, but you should be able to get the same thing in the SP. Software Support for Sage Mas90, Macola, Crystal Reports and Goldmine
 
DGillz,

I can't thank you enough for the help you are giving me. I meant it when I said this was really really new to me! I put in the following formula and got a fractional truncation error message.

if {brptJCEstCostItem;1.EndMonth}={?@EndMonth} then
if {brptJCEstCostItem;1.PerActualCost}>=0 then
{brptJCEstCostItem_MAPP;1.PerActualCost}

I'm trying to get the period actual cost for the current month only. Any other ideas?!!

Becky
 
Becky,

I've never heard of a fractional truncation error. I also don't understand the closed bracket "]", the ";1.endmonth" or the ";1.PerActualCost" parts of your formula. And there is no else in your formula, so what value would be assigned to your formula if it fails both tests?

Maybe these are all SQL things, in which case I cannot help you.

You can feel free to email me your report at dgilsdorf@altavista.com if this a SQL issue. Other than that I don't know.
Software Support for Sage Mas90, Macola, Crystal Reports and Goldmine
 
DGillz,

Thanks for your help. This is a SQL problem, that I have passed on to someone here much more knowledgeable!

Thanks again!
Becky
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top