title: Crystal Reports Dynamically Grouping by Date
body: <p>I'm relatively new to Crystal Reports and it seems like this should be easy, but I haven't been able to figure it out after a lot of googling.  I'm working on a report in Crystal Reports XI that will show total hours logged by support staff for a date range and show sub totals by week, month, or both depending on the user input.  My report is currently arranged as follows:</p>
  
  <pre><code>Group 1 Header - Support Staff Member 
    Group 2 Header - Ticket Closed Date with section printed monthly
      Group 3 Header - Ticket Closed Date with section printed weekly
        Group 4 Header - Ticket Category
        Group 4 Footer - Sum of time logged in each category for the week
      Group 3 Footer - Sum of time logged in all categories for the week   
    Group 2 Footer - Sum of time logged in all categories for the month
  Group 1 Footer - Sum of all time logged
  </code></pre>
  
  <p>My original idea was just to suppress the header and footer for groups 2 and 3 when they weren't needed, but if I manually do that it still prints the records by week and month.  Is there a way to not have the grouping at all unless the parameter says to show those totals?  Or if that isn't an option, how would I use the parameter to change whether the group prints records weekly or monthly?</p>
  
  <p>Thank you</p>