Solved

Crystal Reports Selective Grouping

Posted on 2007-04-05
5
466 Views
Last Modified: 2008-07-29
I am using crystal reports 10.0. I have a report where I inserted a group ... I want to add a parameter where if a particular value is chosen say "grp" then I display the data with the group I created and if the value "ungrp" is chosen I display the data without the grouping.  Is there a way to do this in crystal reports?

Thanks for your help
0
Comment
Question by:nebest
5 Comments
 
LVL 8

Expert Comment

by:MOA81
ID: 18859084
create a formula as follows call

if value="grp" then
               the field you want to display
else
if vale="ungrp" then
              all the other fields
end if

and in the section expert check the supress and create a formula to hide the group header if the values is ungrp
0
 

Author Comment

by:nebest
ID: 18859531
MOA81,  I don't think your comment will solve the problem, maybe i didn't state it quite clearly or maybe I don't quite understand your comment.  I am restating the problem below.

Design
------
Group by Date - Header
  Group by Item - Header
     Details (Supressed)
  Group by Item - Footer
Group by Date Footer


Data
----
1.1.2007  1111       Apple      20
1.1.2007  2222       Orange           5
1.2.2007  1111       Apple      15
1.2.2007  2222       Orange       5
1.2.2007  3333       Pears      10



I created a parameter called "Options" and the possible values are "date" and "item"


When I select "date" I expect results looking like


1.1.2007
  1111   Apple      20  
  2222   Orange      5

1.2.2007
  1111   Apple      15  
  2222   Orange      5
  3333   Pears      10


When I select "item" I expect

  1111   Apple      35
  2222   Orange     10
  3333   Pears      10

In the second case, it is as if the group by date never existed and we are only grouping by item.  Is this possible?

How do i achieve this?

Thanks again
0
 
LVL 100

Accepted Solution

by:
mlmcc earned 250 total points
ID: 18859630
2 ideas
First group on a formula rather than the database field

Name - MyGroup
Formula
If ({?YourParam} = "GRP)") then
   ToText({YourDateField}, "yyyy-mm-dd")
else
   {ItemField}

Second group
Name - MyGroup2
Formula
If ({?YourParam} = "UNGRP)") then
   {ItemField}
else
    "1"

The second method is to change thegroups from the application
http://support.businessobjects.com/communityCS/FilesAndUpdates/SCR8_VB_RDC_GroupSort.exe.asp


mlmcc
0
 
LVL 22

Expert Comment

by:Ido Millet
ID: 18859791
I don't think you need the 2nd level grouping in the instructions provided by mlmcc.  
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 18860647
Glad i could help

mlmcc
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now