on 2023 Aug 24 6:26 PM
I have a CR2013 report design that has the following sections: Report Header, Group #1 {Customer}, Detail (suppressed), Group #1 Footer, and Report Footer.
Detail Section has {InvoicedAmount}, {PaidAmount}, {CostTotal}
But, If I manually add up the Group #1 amounts for @ExposedAmnt, they don't equal the report footer formula for the same. I think this is because I have to "recreate" the @ExposedAmnt and @%Paid formulas in the Report Footer which gives me a different % value and a different @ExposedAmnt Value for the Report Footer. So my question is this: How can I get a Group formula to total down (sum) for all the group values above added together?
Thanks
Request clarification before answering.
I was able to solved my problem with your advice above! Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Dell ! So I left out the If's for the ZERO value (div by 0) to simplify the post I made sorry. Yes, I will flip the multiply vs divide as well, and I didn't know about the "%" option! Thanks for educating me !!!!
I do need to figure out how to do a global value ! I'll use what you showed above and give it a try !
Thanks !!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Your formulas here are for data at the group level, so they reflect each specific group. You cannot sum percentages to get a total percent - as you have found, it doesn't work that way. Instead, you'll need to create grand totals that don't split by customer and use them.
A couple of additional comments:
- Your percentage formula is wrong - when doing it using division, you need to multiply by 100, not divide. However, you can use the "%" operator in Crystal that will automatically do both the initial division and then multiply by 100. See below.
- You need to be checking for 0 values so that you don't get "division by 0" errors.
As an example, here's what your grand total formulas should look like:
{@Invoice Total}: Sum({InvoicedAmount})
{@Paid Total}: Sum({PaidAmount}, Customer)
{@Cost Total}: Sum({CostTotal}, Customer)
{@Total%Paid}:
If {@Invoice Total} <> 0 then
{@Paid Total} % {@Invoice Total}
Else 0
{@TotalExposedAmnt}:
If {@Total%Paid} <> 0 then
{@Cost Total} * ({@Total%Paid}/100)
Else 0
-Dell
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
75 | |
30 | |
9 | |
8 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.