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

LastFullWeek, LastFullMonth Parameter Field

Status
Not open for further replies.
Apr 28, 2003
38
US
I have several reports that I am trying to deploy to a few managers and they are wanting to see these reports in daily, weekly, monthly, year-to-date, ect.. I tried to create a parameter field that points at the {TABLE.OPEN_TIME} and I create a pick list with the syntax.. LastFullWeek, LastFullMonth ect.. But, I am guessing it is not going to be that easy. It is telling me that "a date field is required".

I know there must be a work around that I am missing.

Thanks in advance.
Mike Soll
 
Right click the {TABLE.OPEN_TIME} and select browse data and check the data type, it sounds like it's not a date nor datetime type of field.

Try posting tehnical information:

Crystal version
Database/connectivity used
Example data
Expected output

-k
 
My Apologies, I thought my question was technical. I dont know how to say it any better. The {TABLE.OPEN_TIME) is a Date/Time Field, so I understand why it is giving me the error message when I try to use a string instead of an actual "DateTime(00,00,00)" value.

Basically, I would like to provide a way to select LastFullWeek, LastFullMonth, type date ranges in a paramater field pick list. The whole report is based off the {Table.Open_Time}

CR v9.2.3.970
Oracle/ODBC Connection

-MikeSoll
 
I don't think you can specify date range functions as parameter values

You'll have to make up string parameters and then evlauate them during record selection

{?DateRange}
D - Daily
W - Last Week
M - Last Month
MTD - Month to Date
LM - Last Month
YTD - Year To Date

In record selection

(
if {?DateRange} = "D" then
{TABLE.OPEN_TIME) in WeekToDateFromSun
else if
if {?DateRange} = "W" then
{TABLE.OPEN_TIME) in LastFullWeek
else if
if {?DateRange} = "MTD" then
{TABLE.OPEN_TIME) in MonthToDate
if {?DateRange} = "LM" then
{TABLE.OPEN_TIME) in LastFullMonth
else
{TABLE.OPEN_TIME) in YearToDate
) and
blah blah blah



Cheers,
-LW
 
Excellent Response! It works perfectly. Thanks LW

-Mike Soll
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top