Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Crystal Reports Selective Grouping

Posted on 2007-04-05
5
Medium Priority
?
517 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 101

Accepted Solution

by:
mlmcc earned 1000 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 23

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 101

Expert Comment

by:mlmcc
ID: 18860647
Glad i could help

mlmcc
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
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 …
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

715 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