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

Vertical Grouping

Status
Not open for further replies.

ErnstNoto

Programmer
Dec 20, 2009
48
SE
Hi!
When performing a grouping in Crystal, this grouping is performed vertival

Headings
Group1
Group2
etc....

Is there a practical/easy way of making a grouping horisontal:

Headings - Group1, Group2, Group3, etc...

amount Group1 Group2....
count Group1 Group2... etc...

Anyone who has a neat way of doing this instead of making a great number of formulas?

Best Regards
Ernst

Best Regards
Ernst Noto
 
Which version of Crystal are you on, I think CR2011 allows Column grouping as you want. Can't recall when it was introduced, possibly CR2008 but I am not sure.

You can use a Manual Crosstab, but that requires you to know col Group names in advance it will not change dynamically.

Ian
 
I Have version 11.5.12.1838

Not really sure what you mean by "need to know col Group names in advance..."

Ernst

Best Regards
Ernst Noto
 
Figured it out :)

Cross tab was not too difficult

Best Regards
Ernst Noto
 
One problem with cross tab - San only present sumarized fields. I have formuals within a group that calculates results out of certain sums. Doesnt seem to be possible to insert a formula like this

Best Regards
Ernst Noto
 
You can show min or max to show text in a cross tab summary field
 

The Crosstab(CT) must be in the footer not header I think I found when doing something similar.

You can create a formula field that uses the results of the sums, and show the formula field in the CT results area, this can be words such as
"just over credit limit", "in credit limit , "very overdue","OK", "send in heavies", a CT can have text instead of numbers.
This formula may have to say "while printing records" at the start if it uses running totals/summaries.
Try
new formula field
"@CT sum"
While printing records;
(sumamount1+sumamount2) x field2
and use @CT sum in the CT summary area
may work.
 
Not sure if i did it correctly, but my effort resultet in the following error: "A print time formula that modifies variables is used in a chart or map"


Best Regards
Ernst Noto
 
for each record, create the sums you want to summarise later
such as
@formula1
if field1 > field2 then field1 else 0

@formula2
if field3 > field4 then field3 else 0

@formula3
@formula1+@formula2

then use @formula3
in the CT summary field rather than field1, field2
you won't need 'while printing records' because the sums are done per record
 
It is not that I want to summarize a field later. The sums are available in CT, but I need the sums for each month to calculate a soulution grade. This in itself is not a complicated thing. The report is grouped by year and month. And I wish to present this horisontally, and CT offers this. But, I can only pick up sumarized fields or make sums of fields in CT. I cant calculate something with the sums.

This is what I want to do:

I have a sum of all invoices per month and sum total paid pr month

Sum 1: Sum Invoiced Amount per month
Sum 2: Sum Paid Amount per month
SolutionGrade Formula: (Sum Paid Amount per month/Sum Invoiced Amount per month)*100

The sums are available in CT, but the solution grade formula is not available so I can put in the solution grade per month. And I cant make a formula within CT.

I have tried to figure out what you suggested, but I cant get it to work.

There is an option winthins CT to change summary and there you can show a sum as percentage of. This would be interesting if I could show sum2 as percentage of sum1, but I can only pick the same field. And to show a field as percentage of itself, will always be 100%. Must be possible to use it some other way. The help says you can choose any sum field, but I am not able to.

It would be interesting to add sum of paid amount twice, and change summary on one of them, and then choose to show this as percentage of "Sum Invoiced Amount per month"


Best Regards
Ernst Noto
 
You can have the same field in the CT summary twice , once as a sum, once as a percentage
 
I know, but as long as I cant choose to show it as percentage of other than itself, it is not really interesting.
I want one of the sums to be shown as percetage og another sum, and I cant figure out how in CT

Best Regards
Ernst Noto
 
You can create percentages like these by using formatting formula areas to set up variables; this allows you to reference another summary in the current summary. If you do an Advanced Search of threads here looking for crosstabs, you will find older threads where I have explained this method.

-LB
 
Tank you, I have been trying to locate a thread, but I still haven't found any. Also, the CR version I have is 11.5.12.1838
I will keep looking, but if you by chance should have a thread number/link, that would be greatly appreciated.

Best Regards
Ernst

Best Regards
Ernst Noto
 
Here is an example: thread767-1233091. You don't have to create the initial formulas for the summary fields. Start with the logic right after that.

-LB
 
Not sure if I fully understand what I am doing, but it works - Thank you so much! :)

Best Regards
Ernst Noto

Best Regards
Ernst Noto
 
You are basically making use of the formatting formula areas to create variables within the crosstab. This allows you to pass the value of one or more summaries to another "holder" summary for calculations that can then be displayed using "display string" (ignoring the underlying 0 summary).

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top