问题
I want to total a cross tab report like
GroupName Items Item% 1stStock 2ndStock ------ nStock
--------- ----- ------ -------- -------- -------
Fruits Apples 5 100 100 500
Tomatoes 10 200 50 200
Mangoes 10 300 50 100
------------------------------------------------------------
Total 25% 600 200 800
------------------------------------------------------------
Vegetables Carrots 40 10 20 --------- 20
------------------------------------------------------------
Total 40% 10 20 --------- 20
------------------------------------------------------------
GrandTotal 65% 610 20 820
How do I make sub totals and grand totals for the rows ?
回答1:
One of these should work for you:
Manual Method:
- Group your report by GroupName
- Drag & drop your fields onto the details section.
- On each of your numeric fields, right click->insert->summary (turn on "add to all group levels" to create both a subtotal and a grandtotal)
Crystal's Crosstab Method:
- Make a blank crosstab in your report header.
- In the Crosstab Expert, define your Rows as {GroupName} and {Items}.
- For Summarized Fields, sum your {nStock} fields.
- Leave the Crosstab Expert and right click->Row Grand Totals->Totals on Top to put the subtotals below the individual values.
来源:https://stackoverflow.com/questions/4582395/grand-total-cross-tab-rows-alongwith-columns