Page 1 of 1
Percentages of Overall Total (sum and count)
Posted: Thu Jul 26, 2012 11:24 pm
by srichardson
I'm new to Stimulsoft and have a report with a few Groupings and I need to know the unit and $$ % of the overall total for each Group.
I was successful in getting the $$ to divide correctly, but cannot get the Count of units to work the same way?
For the $$, I used:
{Div(Totals.Sum(RegionGroupHeaderBand,Details.Exp_loan_amount)
, Totals.Sum(MasterDataBand,Details.Exp_loan_amount))}
but, {Div(Totals.Sum(RegionGroupHeaderBand,CountDistinct(Details.LoanNumber)),Totals.Sum(MasterDataBand,CountDistinct(Details.LoanNumber)))} isn't yielding the correct answer?
Example:
Region 1
5 units 33.33% of Total
$100,000 11.76% of Total
Region 2
7 units 46.67% of Total
$250,000 29.41% of Total
Region 3
3 units 20.00% of Total
$500,000 58.82% of Total
Total
15 units
$850,000
Thanks!!
Re: Percentages of Overall Total (sum and count)
Posted: Fri Jul 27, 2012 12:24 pm
by HighAley
Hello.
srichardson wrote:I'm new to Stimulsoft and have a report with a few Groupings and I need to know the unit and $$ % of the overall total for each Group.
I was successful in getting the $$ to divide correctly, but cannot get the Count of units to work the same way?
For the $$, I used:
{Div(Totals.Sum(RegionGroupHeaderBand,Details.Exp_loan_amount)
, Totals.Sum(MasterDataBand,Details.Exp_loan_amount))}
but, {Div(Totals.Sum(RegionGroupHeaderBand,CountDistinct(Details.LoanNumber)),Totals.Sum(MasterDataBand,CountDistinct(Details.LoanNumber)))} isn't yielding the correct answer?
Please, try to use next expression:
Code: Select all
{Div(Totals.Sum(RegionGroupHeaderBand,Totals.CountDistinct(Details.LoanNumber)),Totals.Sum(MasterDataBand,Totals.CountDistinct(Details.LoanNumber)))}
If it will not help then please send us a sample data for your report.
Thank you.
Re: Percentages of Overall Total (sum and count)
Posted: Fri Sep 21, 2012 9:03 pm
by srichardson
I've tried the suggested expression and it doesn't work.
I'm attaching sample data to help explain what I need. I'm still trying to learn the ins and outs of the program, so please let me know if I'm going about this in the wrong way. I have 4 groupings. My MastserDataBand can have multiple results per Loan (the lowest group). I didn't realize the last time I submitted this question, I though I had the group totals working, but it was multiplying the loan amount by the number of occurences in the MasterDataBand, so it wasn't correct.
Region (group)
Branch (group)
Loan Officer (group)
Loan (group)
Loan Details (MasterDataBand) - can have multiple results for a single loan
Please let me know if there's additional information needed! Thanks for your help.
Re: Percentages of Overall Total (sum and count)
Posted: Mon Sep 24, 2012 12:13 pm
by HighAley
Hello.
As we understand you have several rows for one Loan in your Data Source and display the one value of those rows on the Group header. But they are still exist and is summed by Totals.Sum() function.
You should rebuild your report and data to use us master-detailed report or use variables to count sum us you need.
Thank you.
Re: Percentages of Overall Total (sum and count)
Posted: Mon Sep 24, 2012 3:38 pm
by srichardson
Yes, I have several rows for one loan. I can currently only connect to one datasource, so I don't think the master-detailed report is an option (right?).
Would you mind providing an example of how the variable should be setup to accomplish this?
Thank you!
Re: Percentages of Overall Total (sum and count)
Posted: Tue Sep 25, 2012 9:43 am
by HighAley
Hello.
You should just create a variable and add its' value in the Begin Render event of the each GroupHeader.
Look at the attached report template.
Thank you.
Re: Percentages of Overall Total (sum and count)
Posted: Tue Sep 25, 2012 3:47 pm
by srichardson
I can tell you're using a variable FirstSum, but I don't see the actual variable in the dictionary (not sure if it's my version or limitation to only connect to one datasource). Can you please send me the details of what your variable "default value" is set to? and if any of the checkboxes are marked?
Thanks!
Re: Percentages of Overall Total (sum and count)
Posted: Wed Sep 26, 2012 1:57 pm
by HighAley
Hello.
You could find the variable in the Dictionary.

- Variable.png (43.67 KiB) Viewed 5610 times
Thank you.