on 09-18-2009 4:20 PM
hello for example a want to calculate the total of 3 rows, for example:
profit loses
October 100 50
November 150 20
December 100 50
Total 350 120
how can i put the total value in a grid...i know that i can put the total label in a grid in Row Heading but then i create a XML Document but the total appears always,in this example, next loses...
Could anyone give a tip??
regards
Mário
Mario,
If you are already configured this trnsaction then do like this:
create local properties of profit and loss. Use repeater action block and configure with your data xpath:SQL.output{/Rowsets/Rowset/Row}.Use Assignment action and map the local proertes as: Local.profit+repeater{/Row/profit}
Put a Row action below repeater and configure it with your document action block.In row map your total to these profit and loss.
-Suresh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hello Suresh, i think that i dont explain very well because i already do what you say and isnt working only for total because for the shift is already working , i create a XML document with 3 columns...then i put a loop then i put my Sql Query that returns only one row, then i put i repeater, then i put the Assignment block to increase the shift, put Local.Yieldrepeater{/Row/Yield} and Local.scraprepeater{/Row/scrap} then i put the Row..in this row in map...for scrap, for quantity and for total...but i only have one total and when you say to map total i can only put local.Scrap or local.Yield if i put the 2 is always asking if i want to overwrite the existing link...
what im doing wrong for the total..?
regards
Mario
Mario,
Add another row action block after repeater action(repeater should complete all its loops, eg:if query has 3 rows it should complete 3 cycles).i.e.other row action shouldnot be in loop.configure row with the same Doc output. In Row action link the columns as mentioned below:
For Month cloumn ---> Map ---> "Total"
For Profit column ---> Map -
> Local.profit
For Loss column ---> Map -
> Local.loss
-Suresh
hello, at the moment my transaction is like this: http://img6.imageshack.us/img6/2215/transzd.jpg
my Assignment_2 is doing this: http://img529.imageshack.us/img529/9685/ass2.jpg
and my Row_0 is doing this: http://img44.imageshack.us/img44/893/row0.jpg
what is missing to calculate the total of Yield and total of Scrap...separated...
i have to add in Row_0 to Total..like this Total = Total + Local.Scrap and Total = Total + Local.Yield??
regards and have a good weekend
Mário
thanks to all
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If your data is coming in an SQL query then do it there, use the UNION to merge the initial select statement results with the SUM(profit) AS Profit...
If your data is already being constructed in a transaction then use the Row action to add your totals to the output xml document.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
9 | |
7 | |
3 | |
2 | |
2 | |
2 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.