# Slight Improvements to the Weekly Recap Report

In a post labeled SalesLogix Ticket Reports (Part 7) dated Feb 19th, 2009 I wrote a blog post reviewing the SalesLogix Weekly Recap Crystal Report. During the post I did not have much to write about this particular report.  When I reviewed the report today I thought of one improvement that we could make.  Currently this report is set up to give you the numbers for the number of Tickets created in the system and display them by User for the current week.  What I want to do is expand the use of this report out so a user can view the numbers of tickets in a larger selective period based on user input.

The first step here is to make a parameter.  This parameter will be called “Week”, we set it up as a string.  The parameter will have the following values to select from.

• 0 to 30 Days

• 31 to 60 Days

• 61 to 90 Days

• 1st Quarter

• 2nd Quarter

• 3rd Quarter

• 4th Quarter

• Year To Date

• Since Sunday this Week (Default)

This is the Prompt Text I used “Select the Time Frame that you want to view this report?”

Now all we have to do is set up the Report Selection Formula.   Here we will use some of the standard functions that come with Crystal Reports to help us out.

Here is the formula

if {?Week} = “0 to 30 Days” then {TICKET.RECEIVEDDATE} in Aged0To30Days
Else
if {?Week} = “31 to 60 Days” then {TICKET.RECEIVEDDATE} in Aged31To60Days
Else
if {?Week} = “61 to 90 Days” then {TICKET.RECEIVEDDATE} in Aged61To90Days
Else
if {?Week} = “1st Quarter” then {TICKET.RECEIVEDDATE} in Calendar1stQtr
Else
if {?Week} = “2nd Quarter” then {TICKET.RECEIVEDDATE} in Calendar2ndQtr
Else
if {?Week} = “3rd Quarter” then {TICKET.RECEIVEDDATE} in Calendar3rdQtr
Else
if {?Week} = “4th Quarter” then {TICKET.RECEIVEDDATE} in Calendar4thQtr
Else
if {?Week} = “Year To Date” then {TICKET.RECEIVEDDATE} in YearToDate
Else
if {?Week} = “All” then {TICKET.TICKETID}>””
Else
if {?Week} = “Since Sunday This Week” then {TICKET.RECEIVEDDATE} in WeekToDateFromSun

A couple additional changes, I also added a label under the Report Title so you can see what Parameter is selected and also I change the report layout form landscape to portrait.

Now this report can be used for week by week comparison of the number of Tickets your system over larger periods of time.

Get all of our Free SalesLogix Reports here…

Crystal Report Writing for SalesLogix

Later…..

Geo