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!

Capturing YTD based on Date Range 1

Status
Not open for further replies.

rwn

Technical User
Dec 14, 2002
420
US
I have a sub report that shows summary YTD data for the current Year. When Container report when it is run, the user enters a Begin Date and and End Date to see Detail information for that date range. Another subreport shows summary Monthly totals just fine. I need to have the YTD subreport show only the YTD data for the date range entered. For example: the user enters 4/1/2012 to 4/30/2012, the container report shows the correct data for the sub report Monthly, by I can get the YTD sub report to show. HEre is my Select Expert formula. {@ShippedDate} <= {?Pm-?End Ship Date}. My formula that needs helps is this one:
if {@ShipYear} = {@Year} then
{@ShippedDate}-{@PromisedDate}

I need have the year be for only the year as entered in the {?Pm-?End Ship Date}. .

thanks in advance!!
 
There are a few ways to do it, the way I'd do it is to change the select statement to this:
{@ShippedDate} in date(year({?Pm-?End Ship Date}),1,1) to {?Pm-?End Ship Date}
 
That worked perfect for the YTD, in research I found that my MTD range is not working as I originally thought. SO, I need it to function like the below but based on the Month.
{@ShippedDate} in date(year({?Pm-?End Ship Date}),1,1) to {?Pm-?End Ship Date}


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top