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!

Month to month comparison 2

Status
Not open for further replies.

JCook23

Technical User
May 19, 2004
39
US
I am writing a report that would list all months across with all customers down:

Jan Feb Mar Apr etc
Customer 1
Customer 2
etc

I planned on using 12 subreports; one for each month. I have the subreports written. However, I cannot just use the record selection to determine the date. I need to use a formula in the section expert to suppress the details section if the date is not equal to that month. Example:

If{sochng.fdate} is between Jan 1, 2004 and Jan 31, 2004 then False else True

How do I write this formula?

Are 12 separate subreports the way to go? Or, should I just use four and have it by quarter? Is there a way for the viewer to drill down from quarter to month?

I am using version 10. SQL Server DB. ODBC Connection.

Not sure if that is need. Thanks for any input.

Jeff C
 
I would create a manual crosstab and eliminate the subreports.

Here is a FAQ on how to set one up.

faq149-1639

Lisa
 
Thanks, Lisa!

I will do that. Just to ease my frustration, do you know how I would have written the formula I wanted in the section expert?
 
{sochng.fdate} in {?dateyouwanttostart} to {?dateyouwanttoend}

You can either hard code them or have them be parameters.

For example, if you always wanted everything for the current year:


{sochng.fdate} in date(datepart("yyyy",currentdate),1,1) to date(datepart("yyyy",currentdate),12,31)

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top