Report Design
 Crystal Reports Forum : Crystal Reports .NET 2003 : Report Design
Message Icon Topic: Group Cloaking Post Reply Post New Topic
Author Message
moleary
Newbie
Newbie


Joined: 06 Feb 2008
Location: United States
Online Status: Offline
Posts: 28
Quote moleary Replybullet Topic: Group Cloaking
    Posted: 30 Apr 2008 at 12:51pm
I have two groups in my report that are based off formulas. I also have a parameter that shows details or not.  Is there a way to not group on group one if they choose not to see details? I know I can supress it but it still breaks it out by date, but in my summary (no detail) I just want to see the group by (?GROUP).... Below are my group formulas
 
Does this make sense?
 
 
group1-
IF {?DATE}='E' THEN
{gm_rpt_AdjustmentWriteOff;1.ENTRYDATE}
ELSE
IF {?DATE}='P' THEN
{gm_rpt_AdjustmentWriteOff;1.PAYDATE}
 
group2
IF {?GROUP} = 'R' THEN
    {gm_rpt_AdjustmentWriteOff;1.RDOC}
ELSE
IF {?GROUP}  = 'P' THEN
    {gm_rpt_AdjustmentWriteOff;1.PROV}
ELSE
if {?GROUP} = 'F' THEN
    {gm_rpt_AdjustmentWriteOff;1.FACILITY}
ELSE
IF {?GROUP} = 'N' THEN
'ALL'
IP IP Logged
Seva
Newbie
Newbie
Avatar

Joined: 01 May 2008
Location: United States
Online Status: Offline
Posts: 10
Quote Seva Replybullet Posted: 01 May 2008 at 2:25pm
Built Subreport, same as Main Report, but without Group 1 and details, and put it to the Main Report footer.
Now you will suppress or Subreport, or all Sections of Main Report,
except of Main Report footer.
 
Thanks,
Seva
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 02 May 2008 at 2:19pm

Sometimes subreports aren't the best answer - they take extra processing and create a second connection to the database.

You could modify your groups.  I would break this down into 4 formulas, something like this:
DateGroup
IF {?DATE}='E' THEN
  toText({gm_rpt_AdjustmentWriteOff;1.ENTRYDATE}, 'yyyyMMdd')
ELSE
IF {?DATE}='P' THEN
  toText({gm_rpt_AdjustmentWriteOff;1.PAYDATE}, 'yyyyMMdd')
WriteoffGroup
IF {?GROUP} = 'R' THEN
    {gm_rpt_AdjustmentWriteOff;1.RDOC}
ELSE
IF {?GROUP}  = 'P' THEN
    {gm_rpt_AdjustmentWriteOff;1.PROV}
ELSE
if {?GROUP} = 'F' THEN
    {gm_rpt_AdjustmentWriteOff;1.FACILITY}
ELSE
IF {?GROUP} = 'N' THEN
'ALL'
Group1
If {?DETAILS} = 'Y' then
  {@DateGroup}
else
  {@WriteoffGroup}
Group2
If {?DETAILS} = 'Y' then
  {@WriteoffGroup}
else
  ' '
You can use any string in the else of Group2.
 
Because formulas always have to have the same data type in the result, you have to convert your date fields from your current Group1 to a string.  If your dates will span multiple years, you have to use the 'yyyyMMdd' format, otherwise they won't sort correctly.  For example, with 'MM/dd/yyyy' format you would have the following order:
 
01/01/2007
02/01/2005
12/01/2006
 
but in 'yyyyMMdd' format you get:
 
20050201
20061201
20070101
 
-Dell
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.016 seconds.