Crosstab Summary that is a % of Total
-
- Posts: 14
- Joined: Thu Jul 26, 2012 9:52 pm
Crosstab Summary that is a % of Total
I have a crosstab with the following info
Row: State
Column: Month
Summary: Units
Amount
% Total
I have everything working except the % Total summary. I need to be able to show the following where the % Total is equal to the Amount for the State divided by the Total Amount for all states. How do I accomplish this? I tried using this expression:
{Details.LoanAmount / (double)Totals.Sum(Data, Details.LoanAmount)} but it's not coming out as expected.
Thanks!
Row: State
Column: Month
Summary: Units
Amount
% Total
I have everything working except the % Total summary. I need to be able to show the following where the % Total is equal to the Amount for the State divided by the Total Amount for all states. How do I accomplish this? I tried using this expression:
{Details.LoanAmount / (double)Totals.Sum(Data, Details.LoanAmount)} but it's not coming out as expected.
Thanks!
- Attachments
-
- crosstab.png (6.76 KiB) Viewed 3980 times
Re: Crosstab Summary that is a % of Total
Hello.
Please, read the Calculating percents in columns of cross-tab article on our Knowledge Base.
Thank you.
Please, read the Calculating percents in columns of cross-tab article on our Knowledge Base.
Thank you.
-
- Posts: 14
- Joined: Thu Jul 26, 2012 9:52 pm
Re: Crosstab Summary that is a % of Total
Do you happen to have a sample report with this functionality that I can review, I'm unsure how it all fits together.
Thanks
Thanks
Re: Crosstab Summary that is a % of Total
Hello.
Here is a sample report. Thank you.
Here is a sample report. Thank you.
-
- Posts: 14
- Joined: Thu Jul 26, 2012 9:52 pm
Re: Crosstab Summary that is a % of Total
When I copy the code entered in the ProcessCell from your sample report, I receive an error "The name'ht' does not exist in the current context". Playing with the code, I can get the % to come up using the row total...but I cannot get the denominator to use the column total for my field.
Re: Crosstab Summary that is a % of Total
Hello,
Please check that you copy additional code from Code tab:
private System.Collections.Hashtable ht = new System.Collections.Hashtable();
Thank you.
Please check that you copy additional code from Code tab:
private System.Collections.Hashtable ht = new System.Collections.Hashtable();
Thank you.
-
- Posts: 14
- Joined: Thu Jul 26, 2012 9:52 pm
Re: Crosstab Summary that is a % of Total
I'm having trouble locating the Code Tab. Would it be possible to show me how to access using your demo site http://web.stimulsoft.com/Design/Reports/LargeCrossTab ?
Thanks!
Thanks!
Re: Crosstab Summary that is a % of Total
Hello,
Please clarify which version do you use. In the WebDesigner is not available the Code Tab.
Thank you.
Please clarify which version do you use. In the WebDesigner is not available the Code Tab.
Thank you.
-
- Posts: 14
- Joined: Thu Jul 26, 2012 9:52 pm
Re: Crosstab Summary that is a % of Total
I use Reports.Web version 2013.1.1600
I tried adding System.Collections.Hashtable ht = new System.Collections.Hashtable() to some of the Print/Render Events in order to get it added to the code, but it is still coming back stating "The name 'ht' does not exist in the current context"
I tried adding System.Collections.Hashtable ht = new System.Collections.Hashtable() to some of the Print/Render Events in order to get it added to the code, but it is still coming back stating "The name 'ht' does not exist in the current context"
Re: Crosstab Summary that is a % of Total
Hello.
Please, use next option to enable Code tab in the Web Designer.
Thank you.
Please, use next option to enable Code tab in the Web Designer.
Code: Select all
StiWebDesignerOptions.CodeTabVisible = true;