Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Dynamic Grouping Post Reply Post New Topic
Author Message
patil
Newbie
Newbie


Joined: 19 Apr 2010
Online Status: Offline
Posts: 16
Quote patil Replybullet Topic: Dynamic Grouping
     Posted: 11 Jan 2011 at 8:31pm
Hi All,
 
How can i create dynamic grouping in crystal reports??
Plz Plz Plz reply ASAP.
Thanks in advance...
 
 
 
 
IP IP Logged
Keikoku
Senior Member
Senior Member


Joined: 01 Dec 2010
Online Status: Offline
Posts: 386
Quote Keikoku Replybullet Posted: 12 Jan 2011 at 4:28am
http://www.crystalreportsbook.com/Forum/forum_posts.asp?TID=6740

try this

Basically you use a formula that will take parameter arguments to determine your grouping.

Edited by Keikoku - 12 Jan 2011 at 4:29am
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 12 Jan 2011 at 4:30am
the information needs to be the data already, ie it has to be something that is easily tested, like {table.dateField} > someDate.
 
with that said, create a formula that sets up the group that you want, like:
if @group = 1 then
  {table.field1}
else
  {table.field2}
 
The only proviso is that the IF statement has to return the same type of value both branches.  So you can't return a date and a number, or a string and a number like:
if x then
  1
else
 "a"
 
Once you have the formula, create a group and use the formula to group on instead of field in a table.
 
HTH
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum