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

Monthly Report

Status
Not open for further replies.

TEM3

Technical User
Dec 6, 2004
324
US
I am using the following formula to select records for a particular month (CR 8.5/Oracle):

({ALL_ASSIGNMENTS.Date Assigned} in date(year({?LastDayofMonth}),month({?LastDayofMonth}), 01) to {?LastDayofMonth})

LastDayofMonth is a parameter.

It is a lot easier to know the first day of the month than the last (30 days has September, April........). I know there has to be a better formula to use......

 
Try:

{ALL_ASSIGNMENTS.Date Assigned} in {?FirstDayofMonth} to dateadd("m",1,{?FirstDayofMonth})-1

-LB

 
I, too, have Crystal 8.5 and here's how I do mine

Your date parameter, {?LastDayofMonth}), can be any valid date.

Change your formula to the following

Code:
({ALL_ASSIGNMENTS.Date Assigned} in dateserial(year({?LastDayofMonth}),Month({?LastDayofMonth}),1) to dateserial(year({?LastDayofMonth}),Month({?LastDayofMonth})+1,1-1)

Cheers
-LW
 
Another follow up question:

This report contains a sub-report - another cross tab that looks at different data for the same time period. I had hoped to find a way to only have the user enter the parameter once, but, if there is a way, I missed it.

Is there a way to pass a parameter from the parent report to the sub-report??
 
Create the same parameter in the subreport and use it in the selection criteria, and then go to the main report->edit subreport links->move the main report parameter to the right and in the bottom left corner, instead of choosing {?pm-?yourparm}, use the drop down and select {?yourparm}.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top