I have a report that displays the below data:
Bill | Status | Value
Food | Paid | 10
Gas | Overdue | 15
Electricity | Open | 20
Fun | Paid | 25
What I need is to display total by status which, in this example, would be 35 for paid bills, 15 to overdue bills and 20 to open bills (I don't know if open is the English term to a bill that is not overdued and not paid yet either).
This question is not duplicate with question How to sum all values in a column in Jaspersoft iReport Designer? because what I need is to sum bill values by its status field and not to sum all values regardless of the status field.
This question is not duplicate with question Grouping records in JasperReports either because I can't change report layout and group its data. What I need is to display totals by status which I'm already doing programatically in Java and passing these three kind of totals by report parameters.
Related
using SSRS 2008 R2 here.
I've been able to get a similar layout to work with a regular tablix, where I get each group header to fall on top of each other in the same column by adding a row within that group, however I need to use a Matrix because of a dynamic column (month below). When I try to add another row, it only adds a row where the monthly data starts, not in the headers. So the headers stay in their each column. In trying to keep the example as easy as possible, I'm trying to do something like this (Store theme).
STORE NAME | MONTHS
STATE | SALES
TOWN(S) | SALES
which woudl look something like this in a Matrix
WALMART JAN FEB MARCH etc....
TEXAS | 3000 2000 6000
HOUSTON | 1000 500 2500
AUSTIN | 2000 1500 3500
I've only been able to produce something like this where each group is a seperate column:
STORE | STATE | CITY | JAN | FEB | MAR |
WALMART | TEXAS | HOUSTON | 1000 | 500 | 2500 |
| AUSTIN | 2000 | 1500 | 3500 |
Again, I've been able to get a regular Tablix formatted like this, but a Matrix I'm struggling with. Can anyone help me on how to do this? Thank you in advance!!
It is possible using a tablix/matrix and adding some special grouping settings.
Add a tablix with the City field in Row Groups pane:
Right click the City group, select Add Group / Parent Group. Choose State and set Add a Group Header
Delete the left most column (State column added in the previous step).
Note the group is still present.
Right click the STATE group and add a Parent Group as step 2. In this case choose STORENAME
Again delete the left most column (Store Name column added in the previous step)
You will get the following tablix.
Delete the first row
Set the Fields using the Row Group hierarchy order. STORENAME/STATE/CITY
Right click the first cell in the next column and add a group / Column Group / Parent Group. Choose MONTH in group by.
Delete the first row.
Set SUM(Fields!Sales.Value) in the next cells in the same column.
After these steps you will get a tablix like this in design window.
It should produce:
Let me know if this helps.
I am making a report in "SAP Crystal Reports" and I need to calculate the sum total of the group field. Report is grouped by user name, I made the "Running Total Fields" field and it calculates all of them as in example below:
UserName 1 2
3
1
-----------
6
UserName 2 1
2
-----------
9 <------- I need here 3
Does anyone know how to solve this?
Thanks in advance.
Two options:
edit the running total field and reset it after each group (it is now generating a total for all records).
use a summarized field - select the field in the details section and choose Insert | Summarized Field...
I would also suggest reading a book on the topic.
I have a group running total that needs to be sum up at the report footer. Since thats not possible with CR I had to end up having another running total that refreshes "Never". But now I need to calculate some percentages at the group level based on this Grand total. Unfortunately I cannot access the value for grand total (because its another running total).
Confused?? Ok reports should look like below..
Column 1 | Colunm 2
======== =========
| Group 200 (Running Total Refresh at Group level) | 20% (200%1000) |
| Group 500 (Running Total Refresh at Group level) | 50% (500%1000) |
| Group 300 (Running Total Refresh at Group level) | 30% (300%1000) |
Footer 1000 (Running Total Never Refreshed)
But column 2 doesn't give me the correct value. it gives me 100% always means 200%200 or 500%500 etc.
Any idea how to fix this??
Thanx Lee, using a running total formula worked, I added following formula to the report footer,
numbervar Samples;
if {product.sku}="card-sample" then
Samples := Samples + {#num_qty};
Samples;
Then I use this formula to calculate column 2
Try this
Add a formula field for group percentage and then paste below code in it.
Group total / sum(column)
place this formula at your group level.
I should think your report total wants to simply be a summary field not a running total. Then your column 2 value can be calculated using running total / sum(field);
Here is an example:
I have two columns age and salary.
When age > 18 i want to add the salary.
Initially I used a running total with a condition {age} > 18
That didn't work well so i deleted the running total, and created a formula: if {age} > 18 then {salary} else 0
I then created a summary on that formula field.
Make sense?
so I'm working with Crystal Reports 10 and was looking at the cross tab to try and have a nice and neat table of my information. I'm trying to make a report where for each item (as a row), the columns will be the different sizes it comes in and the value of that cell will be the quantity.
So something that looks like this:
Small | Medium | Large
Item 1 1 | 5 | 10
Item 2 5 | 10 | 15
Using the cross tab though, the quantity field I have has to be totalled, averaged, etc. so I can't get the specific breakdown for each size in a nice table like that. Is there any way to tweak the Cross Tab to do this or is there another tool in Crystal Reports that would let me have the quantities per size in that organized fashion?
Thanks for any help you guys can give.
Update:
The cross tab I have tried gives me something that looks like this
Small | Medium | Large
Item 1 16 | 16 | 16
Item 2 30 | 30 | 30
If I put the values in the details section as separate fields, I'm able to get the values to match up properly, but its not the right format. It comes out like this
Item 1 | Small | 1
Item 1 | Medium| 5
Item 1 | Large | 10
Create a Cross-tab
Add {table.size} to the Columns
Add {table.item} to the Rows
Add {table.quantity} to Summarized Fields
I am working on SSRS 2008.
I have a report as follows, I want the toal of Amount in Total column. I am not able to get total in column. I have tried Add Total / Sum() features of SSRS but no luck.
+---------+-------+--------+-------+
|Supplier | Agent | Amount | Total |
+---------+-------+--------+-------+
| | A10051| 237.2 | |
|S2005068 +-------+--------+ |
| |A10052 | 23.8 | |
+---------+-------+--------+-------+
I think your design is not proper. The total row in the last column will be under the details group. If you want a total on the last column you can get but for-each row it will repeat. use
=Sum(Fields!Amount.Value,"Supplier") here Supplier is the "Group Name"
To avoid this repeatition we need to add the total column inside the supplier group and use =Sum(Fields!Amount.Value) for total
or
Right click on the Amount column data -> Add Total -> Before or After. This will display the sub-total for the Supplier group in the same Amount column after/before as you selected.
Add total on the supplier group, add it before or after, depending if you want it on top or bottom. SSRS will fill in =SUM(Fields!Amount.Value) and show the total 268 below.
To make a Total Rows =countRows("dataset")