How to add a String column to right of the totals in a crosstab
<div> </div>
<div><span style="font-family:'courier new', courier, monospace;">Is there a way to add a string column to the right of the totals of a crosstab. Below is the output that I am trying to create:</span></div>
<div> </div>
<div><span style="font-family:'courier new', courier, monospace;">+
+
+
+
+</span></div>
<div><span style="font-family:'courier new', courier, monospace;">| | | C L A I M A M O U N T | |</span></div>
<div><span style="font-family:'courier new', courier, monospace;">| CLAIM# | RO# +
+
+
+
+ REMARKS |</span></div>
<div><span style="font-family:'courier new', courier, monospace;">| | | PARTS | LABOR | MISC | TOTAL | |</span></div>
<div><span style="font-family:'courier new', courier, monospace;">+
+
+
+
+
+
+
+</span></div>
<div><span style="font-family:'courier new', courier, monospace;">| 1001 | 10 | 10.75 | 2.50 | 0.95 | 14.20 | Remarks #1 |</span></div>
<div><span style="font-family:'courier new', courier, monospace;">+
+
+
+
+
+
+
+</span></div>
<div><span style="font-family:'courier new', courier, monospace;">| 1002 | 11 | 8.50 | 4.20 | 1.25 | 13.95 | Another long remarks |</span></div>
<div><span style="font-family:'courier new', courier, monospace;">+
+
+
+
+
+
+
+<span> </span></span></div>
<div> </div>
<div>
<div><span style="font-family:'courier new', courier, monospace;">The SQL statement for my cube is:</span></div>
<div><span style="font-family:'courier new', courier, monospace;">select claim_no</span></div>
<div><span style="font-family:'courier new', courier, monospace;"> ,ro_no</span></div>
<div><span style="font-family:'courier new', courier, monospace;"> ,type</span></div>
<div><span style="font-family:'courier new', courier, monospace;"> ,amount</span></div>
<div><span style="font-family:'courier new', courier, monospace;"> ,remarks</span></div>
<div><span style="font-family:'courier new', courier, monospace;"> from warranty</span></div>
<div><span style="font-family:'courier new', courier, monospace;"> where cust_id = ?</span></div>
<div><span style="font-family:'courier new', courier, monospace;"> and year = 2014 <span> </span></span></div>
<div> </div>
<div><span style="font-family:'courier new', courier, monospace;">My cube has the following setup</span></div>
<div><span style="font-family:'courier new', courier, monospace;">Claim# and RO# on the row; type on the column and sum(amount) as measure.</span></div>
<div> </div>
<div><span style="font-family:'courier new', courier, monospace;">I am able to put the remarks between RO# and CLAIM AMOUNT but I would like to have it at</span><span style="font-family:'courier new', courier, monospace;">the right-most column as shown in my illustration. Is this possible with a single crosstab.</span></div>
<div><span style="font-family:'courier new', courier, monospace;">Any help would be greatly appreciated.</span></div>
<div> </div>
<div><span style="font-family:'courier new', courier, monospace;">Thanks in advance.</span></div>
<div><span style="font-family:'courier new', courier, monospace;">Mario</span></div>
<div> </div>
</div>
<p> </p>