Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Become a Premium Member and unlock a new, free course in leading technologies each month.

Solved

Posted on 2006-10-24

Crystal 9.0

I want to perform a calc (see “@Compare” formula below) on Group 4 subtotals. I’d like to sum the result of this calc "@Compare" in the higher groups (Group 1, Group2, Group 3).

I am unable to use the Crystal’s Summary function (I assume because the result of “@Compare formula” is in a group section and not in the detail section). Same problem with running total. “@Compare” is not available to summarize.

@Compare formula = If column A> Column B then Column A else Column B

Example Groups and Sections

Column ID: A B C

Group 1 – Job Subtotal Group #1 CC sum of @Compare formula

Group 2 – CSI Subtotal Group #2 CC sum of @Compare formula

Group 3 – CC Subtotal Group #3 CC sum of @Compare formula

Group 4 – Cat Subtotal @Compare formula

Detailed Trans Section

Also - Users want to drill down to the “Detailed Trans” level

Can somebody recommend a direction? My other attempts (in progress):

1. A subreport to summarize the “Detail Trans” section and pass Cat Subtotals from subreport to Main. This will allow my main report’s detail section to be “Cat” thus allowing Crystal summary.

2. A formula in the detail section that summarizes amounts base on Cat value. Link an “On Demand Subreport” if the user needs to drill down to detailed trans level.

I want to perform a calc (see “@Compare” formula below) on Group 4 subtotals. I’d like to sum the result of this calc "@Compare" in the higher groups (Group 1, Group2, Group 3).

I am unable to use the Crystal’s Summary function (I assume because the result of “@Compare formula” is in a group section and not in the detail section). Same problem with running total. “@Compare” is not available to summarize.

@Compare formula = If column A> Column B then Column A else Column B

Example Groups and Sections

Column ID: A B C

Group 1 – Job Subtotal Group #1 CC sum of @Compare formula

Group 2 – CSI Subtotal Group #2 CC sum of @Compare formula

Group 3 – CC Subtotal Group #3 CC sum of @Compare formula

Group 4 – Cat Subtotal @Compare formula

Detailed Trans Section

Also - Users want to drill down to the “Detailed Trans” level

Can somebody recommend a direction? My other attempts (in progress):

1. A subreport to summarize the “Detail Trans” section and pass Cat Subtotals from subreport to Main. This will allow my main report’s detail section to be “Cat” thus allowing Crystal summary.

2. A formula in the detail section that summarizes amounts base on Cat value. Link an “On Demand Subreport” if the user needs to drill down to detailed trans level.

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

3 Comments

The actual cut and paste is

((if Sum ({@Total Estimate}, {JCT_CURRENT__TRANSACTION.

then Sum ({@Total Estimate}, {JCT_CURRENT__TRANSACTION.

)

It takes the greater of Estimated $ vs. Commitment $ for each line in group 4. With this formula in Group 4, I cannot perform the simple "Insert>Summary>" in higher groups. The formula is not available for Summary via "Insert>Summary>"

// @Compare

shared numberVar myTotal;

numberVar thisResult;

if ColumnA > ColumnB then

thisResult := Sum(ColumnA, GroupBy)

else

thisResult := Sum(ColumnB, GroupBy);

myTotal := myTotal + thisResult;

thisResult;

Now in the other groups you can create a formula to show the variable value:

// @ShowValue

shared numberVar myTotal;

If you need to reset the variable simply create a new formula in the appropriate section to set it to zero. If you want to reset at different levels you may need to use multiple variables.

frodoman

Question has a verified solution.

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

Course of the Month4 days, 17 hours left to enroll

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