Conditional Group by.. Is it Possible?

Posted on 2009-02-19
Last Modified: 2012-05-06
Hi I have a report I want to group by two different  fields (one or the other) and Im using a parameter.. For example lets say the user picks State, then grouping would pick and do a total by state. Otherwise the user picks Country and it does a grouping and  total by country..

So currently it will group by country but not by states.. Is there anyway to do either or? Like a Conditional grouping so to speak?? thanks in adv.
Question by:shockacon
    LVL 10

    Accepted Solution

    Very Possible.

    Create a formula called group1 - insert something similar to the following-

    if {?myparameter} = "state" then {mydatabase.state} else
    if {?myparameter} = "country" then {} else "error"

    Then just change your group to group on that formula!

    Author Comment

    that worked! thanks

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
    Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now