Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Grouping Issue 2

Status
Not open for further replies.

ja01

Technical User
Dec 14, 2005
48
0
0
US
Using Crystal9 to create a report that requires a specific grouping. I want to display some data as follows:
On detail Line A dbo.Prospect_name
On Detail Line B dbo.Leader_name
On detail Line C dbo.Campaign_Value
Here is an example:
John Smith (dbo.Prospect_name)
Ed Smith (dbo.Leader_name)
xxx Foundation (dbo.Campaign_Value)

Then the detail lines repeat themselves and thats the problem. For a set of records, If there are multiple leaders or multiple prospects i get something like this:
John Smith (prospect)
Ed Smith (leader)
xxx Foundation (campaign)

John Smith
Anita Ball

I want the data to look like this in this case:
John Smith (prospect shown once)
Ed Smith (show both leaders)
Anita Ball
xxx Foundation (show both corporations)
I tried groupings but I get the same problem of like data not staying together.

Any solutions
 
You could insert a group on prospect and a second group on leader, and then add a subreport to the prospect group footer that showed only the businesses. It would be linked on the prospect field, and within the subreport, you would group on business, with only the group header showing. In the main report you would suppress the detail section.

Alternatively, you could follow the steps above, except you could collect the values of the businesses in a variable in the suppressed detail section, and then display the results in the GF#1, as in:

//{@accum} to be placed in the detail section:
whileprintingrecords;
stringvar x;
if instr(x, {table.business}) = 0 then
x := x + {table.business}+chr(13);

//{@display} to be placed in GF#1:
whileprintingrecords;
stringvar x;

Format {@display} to "Can grow".

//{@reset} to be placed in GH#1:
whileprintingrecords;
stringvar x := "";

-LB
 
Hi,
Grouping on
(dbo.Prospect_name)


should show only one prospect - then try
adding a section to the Details ( right-click add section below)
In DetailsA place
(dbo.Leader_name)
in DetailsB place
(dbo.Campaign_Value)


Should get
Code:
[b]John Smith[/b]  // Group
  Ed Smith      //  DetailA
  Anita Ball    // 

  xxx Foundation  //  DetailB
  [URL unfurl="true"]www Corporation[/URL]  //

Haven't tested since I do not have any data that would use that layout, but seems like it should get what you want.


[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Thank you both for your suggetion. It worked. Here is a diagram of what I did:

GroupHeader1: Prospect Name
Detail Line1: Leader name
GroupFooter1: Campaign (displayed in a subreport)

The only problem now is I cannot seem to get carraige returns to work. I suppressed where duplicated, I chose the Keep Together based on the GroupHeader (which seems to make sense) but at times the campaign information which is a subreport carries over to the next page. In the subreport I chose the Keep together and suppress, just as I did in the main report. Any ideas
 
Not sure what you meant by not being able to get the carriage returns to work. Did you format the display formula to "Can grow"? This is necessary.

You might want to go to report->group expert->options and set "Keep group together", in an attempt to keep everything on one page, but more likely the issue is that you need to minimize the height of subreport sections and suppress unused sections. Same within the main report.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top