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!

Grouping by Month using Selected Date Range 2

Status
Not open for further replies.

alectek

Programmer
Jul 9, 2003
68
US
Hi!

Can somebody help me create a formula in CR 8.5 for Grouping by Month using Selected Date Range.
Parameters: ?Start Date = Date(2003, 04, 23)
?End Date = Date(2003, 04, 23)

Now, they need see how many clients served during each month for selected period using Date of Service

April, 03 100
May, 03 120
June, 03 2
………………..
March, 04 0
April, 04 180


Best, I can make
totext(Year({Date of Service })) + if len(totext(Month({Date of Service }))) > 1 then
totext(Month({Date of Service
else
"0" & totext(Month({Date of Service }))

Still not working.

Thanks a lot for any help.
Alik




 
If they want to know monthly how many clients were served I would start with using this for the starting and ending parameters on the report. Create a formula to prompt for the starting month name and year and ending month name and year.

1. Create 2 month formulas:
monthname(month({SOP30200.DOCDATE}))

2. Create 2 year formulas:
tonumber(year({SOP30200.DOCDATE}))

3. Place the {CUSTOMERNUMBER} field in the details section of the report (Along with any other fields you may want, total sales $ etc.).

4. Insert Group by Month

5. Insert a Summary on {CUSTOMERNUMBER} Choose Distinct Count rather than Maximum for the type of summary.
 
Your record selection formula can just be:

{table.DateofService} >= {?StartDate} and
{table.DateofService} <= {?EndDate}

In the report, insert a group on {table.DateofService} and set it for "the section will be printed for each month." Then right click on {table.DateofService}->format field->date/time->customize->date->format month = March->format day = None->format year = 99->separators (first)->enter a space. This will give you the groupname format like "March 99".

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top