Joined: 12 Jun 2008
Online Status: Offline
Posts: 11
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.
Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
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.
Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
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.
Joined: 12 Jun 2008
Online Status: Offline
Posts: 11
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.
Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
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.
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