Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Crystal reports Crosstab date grouping Post Reply Post New Topic
Author Message
Craigbob
Newbie
Newbie


Joined: 21 Aug 2012
Location: United States
Online Status: Offline
Posts: 27
Quote Craigbob Replybullet Topic: Crystal reports Crosstab date grouping
     Posted: 17 Jan 2013 at 6:06pm
I've created a report using the crosstab control which groups the data by date in columns. I'd like to take all of the dates that are earlier than the 1st of the current month (when the report is run) and combine them and the data being summarized into one column called Previous.

So instead of seeing something like this:

Oct Nov Dec Jan Feb Mar Apr May Jun Jul

I want to see something like this:

Previous Jan Feb Mar Apr May Jun Jul

I've tried the following things:

I've created a formula field called grpSort

if {Command.ReqDate} < {?StartDate} then '0000' else cStr({Command.ReqDate}, 'yyMM')

to sort the data and put that in the column area of the crosstab expert.

Then I created a the following formula:

if {Command.ReqDate} < {?StartDate} then 'Previous' else cStr({Command.ReqDate}, 'MMM')

and put that in the Options area of the group options in the Use formula as Group Name formula.

The data sorts correctly, but I never see the Previous column. What am I doing wrong?

            

Edited by Craigbob - 17 Jan 2013 at 6:10pm
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 22 Jan 2013 at 4:13am
answered in other thread
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