Monday, January 27, 2014

Crystal Reports : Groups at Run Time

This is neat: Let us suppose we want a report to be Grouped on either Users.UserID or Users.UserTerritory, depending on a Parameter field.

So, provide a simple parameter, {?Group} and let the user set it to "UserID" or "Territory".

Now, within your report, create a formula field called {@Group1} and paste in the following code:

IF {?Group} = "UserID" THEN {USERS.USERID} ELSE
IF {?Group} = "Territory" THEN {USERS.USERTERRITORY}

Now, create your Group in crystal, and use {@Group1} as your Group Field.

This way, the user can select how the report should group itself, affecting all summaries, etc.

Try it!

1 comment:

Anonymous said...

Not alone pieces, however , quite possibly gucci outlet happen to be relatively solid. Most are predominantly fabricated for steel animate together with synthetic leather. For the reason that tag heuer replica uk online business may be a raising online business, one should watch out anytime choosing low priced pieces, because of the superior may not so great or simply any shops would possibly not supply warranties. Consumers shop for fake breitling watches given that they might be appearance attractive together with prominent, they might be wow, these as a sure cartier replica sale well-known they also recognize that quite often any well-known develops a bundle into the system.