Report Design
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Report Design
Message Icon Topic: Dynamic Grouping possible ? Post Reply Post New Topic
Author Message
TkNeo
Newbie
Newbie


Joined: 12 Jun 2008
Online Status: Offline
Posts: 11
Quote TkNeo Replybullet Topic: Dynamic Grouping possible ?
    Posted: 16 Jun 2009 at 7:32am
I have 3 columns in my table. I want the report to group by any one of the 3 columns and the user should be able to decide that at run time.

So in my winforms code i have a combo box that lets them select one of the three options and then i am hoping i can set the group by criteria at run time.

Anyone know how to do this ?

Thanks


using CR for VS 2005


Edited by TkNeo - 16 Jun 2009 at 7:32am
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 23 Jun 2009 at 6:38am
create a formula like:
if {?parameter} = "x" then
  {table.field1}
else
 if  {?parameter} = "y" then
  {table.field2}  etc
 
Then for set the group to the formula.  Brian covers this in his book...main reason that I watch this site and not other.  This one concept has made my reports so much more than they were.
 
HTH
IP IP Logged
TkNeo
Newbie
Newbie


Joined: 12 Jun 2008
Online Status: Offline
Posts: 11
Quote TkNeo Replybullet Posted: 23 Jun 2009 at 8:04am
you know group by "formula" does not appear to be an option in my version of crystal report, which is CR VS 2005.

However i had a trial version of CR VS 2008 and it was an option there.

Do you think its possible or am i doing something wrong ? or is it just an older version issue.




Edited by TkNeo - 23 Jun 2009 at 8:27am
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 23 Jun 2009 at 8:20am
Hmmm....I think that there some confusion.  Since I am using CRXI in a VS2005 environment....but this is really a bit of a red herring.
 
Create the formula.  Now create a group or change an existing group, in the upper drop down, just scroll down until you see your formula, select it and you're done.
 
HTH
IP IP Logged
TkNeo
Newbie
Newbie


Joined: 12 Jun 2008
Online Status: Offline
Posts: 11
Quote TkNeo Replybullet Posted: 23 Jun 2009 at 8:28am
Originally posted by lockwelle

Hmmm....I think that there some confusion.  Since I am using CRXI in a VS2005 environment....but this is really a bit of a red herring.
 
Create the formula.  Now create a group or change an existing group, in the upper drop down, just scroll down until you see your formula, select it and you're done.
 
HTH


ok, this is what i am doing. create a formula. open report->group expert. FORMULA DOES NOT SHOW UP.

so annoying !

IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 23 Jun 2009 at 12:00pm
next thing that I would try, would be to drop the formula on the report and see if it displays as expected.  I've never used the group expert, but having just played with it, if the the formula is empty or doesn't contain a field, then it doesn't appear.  I put a field in it, saved and there it was.
 
HTH
IP IP Logged
TkNeo
Newbie
Newbie


Joined: 12 Jun 2008
Online Status: Offline
Posts: 11
Quote TkNeo Replybullet Posted: 23 Jun 2009 at 12:10pm
you were right on.

thanks very much.. i cant believe i could not figure this out :) so dumb


IP IP Logged
Post Reply Post New Topic
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



This page was generated in 0.031 seconds.