Link to home
Start Free TrialLog in
Avatar of ddschreck01
ddschreck01

asked on

change crosstab group option from monthly to quarterly during runtime

How can I change a cross tab column (a date) from grouping monthly to quarterly at runtime?
Avatar of vasto
vasto
Flag of United States of America image

I don't think you can do this. You can create 2 subreports with crosstabs - 1 grouped by date and another one by month and hide the wrong subreport based on a parameter
Avatar of ddschreck01
ddschreck01

ASKER

Thanks.  I was afraid that was the case.  I like your suppress idea.  Thanks.
Why the need for subreports?

You can use 2 cross tabs on the report and suppress one of them

Another idea
Add a parameter to select the monthly or quarterly

Add a formula to the report
Duration
Local StringVar x;

If {?Duration} = "Quarter" then
(
If Month({tblHoursWorked2012.Started}) <= 3 then
   x := "1"
Else If Month({tblHoursWorked2012.Started}) <= 6 then
   x := "2"
Else If Month({tblHoursWorked2012.Started}) <= 9 then
   x := "3"
Else If Month({tblHoursWorked2012.Started}) <= 12 then
   x := "4";
)
Else
   x := CStr({tblHoursWorked2012.Started},"MM");

CStr({tblHoursWorked2012.Started},"yyyy") & "-" & x

Open in new window


Use the formula duration to cntrol the crosstab

mlmcc
ASKER CERTIFIED SOLUTION
Avatar of James0628
James0628

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial