CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2014
    Posts
    6

    Grouping in Formula

    Hi all,

    I do have a description fields like below:

    Students - International
    Student - Default
    Deliver - Local
    Truck - Domestic
    Pick-up - Local
    Student - Local
    Teacher - Domestic

    I want to have them by group in the formula but I am not sure how to do it. So it would be like this:

    International:
    Students - International

    Local:
    Deliver - Local
    Pick - up - Local
    Student - Local

    Domestic:
    Truck - Domestic
    Teacher - Domestic

    Any one can help?

  2. #2
    Join Date
    Feb 2015
    Posts
    11

    Re: Grouping in Formula

    The first step will be to create a formula to obtain your group name.
    1. Create a formula and call it "Location"
    2. In the formula, create a Crystal Syntax logic statement:
    If [NAME OF FIELD] = "Student - Local" then "Local" else
    If [NAME OF FIELD] = "Pick - up - Local" then "Local" else
    If [NAME OF FIELD] = "Deliver - Local" then "Local" else
    If [NAME OF FIELD] = "Students - International" then "International" else
    If [NAME OF FIELD] = "Truck - Domestic" then "Domestic" else
    If [NAME OF FIELD] = "Teacher - Domestic" then "Domestic"
    3. Create a new Group Selector and use the new field [Location] as the group field
    4. Pick the fields you want to see on report, then run report. You may need to move the column labels to the group section for the new look & feel. Also, be sure to use the group selector options and separate groups with a new page. The Group name will be displayed on the top left of the page.
    5. Done. Once you do this, I am sure the requester would want metrics based on the info (which can be done, but this is a good start).
    Last edited by jnole; April 7th, 2015 at 10:14 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured