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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Groups in Columns

Status
Not open for further replies.

Crystalfire

Programmer
Jan 29, 2002
315
US
I need to have a report show Group 1's in a column format.

EX: Group 1 = ASIA
" 1 = CANADA
Group 2 = LP
" 2 = SSF

So instead of showing up as
ASIA
LP
SSF
CANADA
LP
SSF

I need it to look like:

ASIA CANADA
LP ( Group sums will go here )
SSF

I hope I made it clear. Crystal 8.5

 
Dear Crystalfire,

Take a look at the crosstab or if that does not meet your needs and you need "group" column headers with inline vertical groups, then what you want is a manual crosstab.

For manula Group columns you would create a formula something like this:

If {Table.Country} = 'USA'
then 1
else 0

obviously, calculating what you need to show.

This then allows you to sum the values for each column.

regards,

ro


Rosemary Lieberman
rosemary-at-microflo.com, Microflo provides expert consulting on MagicTSD and Crystal Reports.

You will get answers more quickly if you read this before posting: faq149-3762
 
I guess I still don't understand. I can't use the crosstabs as I don't have a field to summerize. Don't see how the formula you gave me would help me set up columns I need?
 
Group on LP/SSF field. Then have two formulas which say

//Formula 1
whileprintingrecords;
shared numbervar x;
if {Table.field}='CANADA' then
x:=x+{table.filed} else x;

//Formula 2
whileprintingrecords;
shared numbervar y;
if {Table.field}='ASIA' then
y:=y+{table.filed} else y;

then
used the formulas under 'ASIA' column and "CANADA' column to get the totals.
 
By the way, you want to sum up some field or count depending on your group ?
 
Dear CrystalFire,

Since you don't have fields that you want to summarize, exactly what is it that you want to show within the coluns for Canada, USA etc... for the groups LP and SSF.

Maybe if you show me some example data, I will be able to give you a better response.

Also, when you post a questions, it is most helpful to the person answering to know what version of crystal, what database, and what driver. Those pieces of information can shape the response.

regards,

ro

Rosemary Lieberman
rosemary-at-microflo.com, Microflo provides expert consulting on MagicTSD and Crystal Reports.

You will get answers more quickly if you read this before posting: faq149-3762
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top