Index: src/report/standard-reports/advanced-portfolio.scm
===================================================================
--- src/report/standard-reports/advanced-portfolio.scm	(revision 13174)
+++ src/report/standard-reports/advanced-portfolio.scm	(working copy)
@@ -42,6 +42,10 @@
 (define optname-shares-digits (N_ "Share decimal places"))
 (define optname-zero-shares (N_ "Include accounts with no shares"))
 (define optname-include-gains (N_ "Include gains and losses"))
+(define optname-show-symbol (N_ "Show ticker symbols"))
+(define optname-show-listing (N_ "Show listings"))
+(define optname-show-price (N_ "Show prices"))
+(define optname-show-shares (N_ "Show number of shares"))
 
 (define (options-generator)
   (let* ((options (gnc:new-options)) 
@@ -72,13 +76,6 @@
 		    (N_ "The price recorded nearest in time to the report date"))
 	    )))
 
-
-    (add-option
-     (gnc:make-number-range-option
-      gnc:pagename-general optname-shares-digits
-      "e" (N_ "The number of decimal places to use for share numbers") 2
-      0 6 0 1))
-
     (gnc:register-option 
      options 
      (gnc:make-simple-boolean-option
@@ -86,6 +83,40 @@
       (N_ "Include splits with no shares for calculating money-in and money-out")
       #f))
 
+    (gnc:register-option
+      options
+      (gnc:make-simple-boolean-option
+	gnc:pagename-display optname-show-symbol "a"
+	(N_ "Display the ticker symbols")
+	#t))
+
+    (gnc:register-option
+      options
+      (gnc:make-simple-boolean-option
+	gnc:pagename-display optname-show-listing "b"
+	(N_ "Display exchange listings")
+	#t))
+
+    (gnc:register-option
+      options
+      (gnc:make-simple-boolean-option
+	gnc:pagename-display optname-show-shares "c"
+	(N_ "Display numbers of shares in accounts")
+	#t))
+    
+    (add-option
+     (gnc:make-number-range-option
+      gnc:pagename-display optname-shares-digits
+      "d" (N_ "The number of decimal places to use for share numbers") 
+      2 0 6 0 1))
+    
+    (gnc:register-option
+      options
+      (gnc:make-simple-boolean-option
+	gnc:pagename-display optname-show-price "e"
+	(N_ "Display share prices")
+	#t))
+
     ;; Account tab
     (add-option
      (gnc:make-account-list-option
@@ -135,13 +166,14 @@
     (string=? (gnc:split-get-guid s1) (gnc:split-get-guid s2)))
   
   (define (table-add-stock-rows table accounts to-date
-                                currency price-fn exchange-fn include-empty include-gains
-                                total-value total-moneyin total-moneyout
+                                currency price-fn exchange-fn 
+				include-empty include-gains show-symbol show-listing show-shares show-price
+				total-value total-moneyin total-moneyout
                                 total-gain)
 
    (let ((share-print-info
 	  (gnc:share-print-info-places
-	   (inexact->exact (get-option gnc:pagename-general
+	   (inexact->exact (get-option gnc:pagename-display
 				       optname-shares-digits)))))
 
     (define (table-add-stock-rows-internal accounts odd-row?)
@@ -231,40 +263,41 @@
                (gaincoll 'merge moneyincoll #f)
 
 	    (if (or include-empty (not (gnc:numeric-zero-p units)))
-		(begin (total-value 'add (gnc:gnc-monetary-commodity value) (gnc:gnc-monetary-amount value))
+		(let ((activecols (list (gnc:html-account-anchor current))))
+		       (total-value 'add (gnc:gnc-monetary-commodity value) (gnc:gnc-monetary-amount value))
                        (total-moneyin 'merge moneyincoll #f)
                        (total-moneyout 'merge moneyoutcoll #f)
                        (total-gain 'merge gaincoll #f)
+		       ;;(define activecols (list (gnc:html-account-anchor current)))	
+		       (if show-symbol (append! activecols (list ticker-symbol)))
+		       (if show-listing (append! activecols (list listing)))
+		       (if show-shares (append! activecols (list (gnc:make-html-table-header-cell/markup
+		        "number-cell" (gnc:amount->string units share-print-info)))))
+		       (if show-price (append! activecols (list (gnc:make-html-table-header-cell/markup
+		        "number-cell"
+		        (if price
+		 	    (gnc:html-price-anchor
+		 	     price
+		 	     (gnc:make-gnc-monetary
+		  	     (gnc:price-get-currency price)
+			     (gnc:price-get-value price)))
+			    #f)))))
+	 	       (append! activecols (list (gnc:make-html-table-header-cell/markup
+		        "number-cell" value)))
+                       (append! activecols (list (gnc:make-html-table-header-cell/markup
+                         "number-cell" (gnc:monetary-neg (gnc:sum-collector-commodity moneyincoll currency exchange-fn)))))
+                       (append! activecols (list (gnc:make-html-table-header-cell/markup
+                         "number-cell" (gnc:sum-collector-commodity moneyoutcoll currency exchange-fn))))
+ 	 	       (append! activecols (list (gnc:make-html-table-header-cell/markup
+                         "number-cell" (gnc:sum-collector-commodity gaincoll currency exchange-fn))))
+                       (append! activecols (list    (gnc:make-html-table-header-cell/markup
+                         "number-cell" (sprintf #f "%.2f%%" (* 100 (/ (gnc:numeric-to-double (cadr (gaincoll 'getpair currency #f)))
+                                                                      (gnc:numeric-to-double (cadr (moneyincoll 'getpair currency #t)))))))))
+                        
 		       (gnc:html-table-append-row/markup!
 			table
 			row-style
-			(list (gnc:html-account-anchor current)
-			      ticker-symbol
-			      listing
-			      (gnc:make-html-table-header-cell/markup
-			       "number-cell" (gnc:amount->string units share-print-info))
-			      (gnc:make-html-table-header-cell/markup
-			       "number-cell"
-			       (if price
-				   (gnc:html-price-anchor
-				    price
-				    (gnc:make-gnc-monetary
-				     (gnc:price-get-currency price)
-				     (gnc:price-get-value price)))
-				   #f))
-			      (gnc:make-html-table-header-cell/markup
-			       "number-cell" value)
-                              (gnc:make-html-table-header-cell/markup
-                               "number-cell" (gnc:monetary-neg (gnc:sum-collector-commodity moneyincoll currency exchange-fn)))
-                              (gnc:make-html-table-header-cell/markup
-                               "number-cell" (gnc:sum-collector-commodity moneyoutcoll currency exchange-fn))
-                              (gnc:make-html-table-header-cell/markup
-                               "number-cell" (gnc:sum-collector-commodity gaincoll currency exchange-fn))
-                              (gnc:make-html-table-header-cell/markup
-                               "number-cell" (sprintf #f "%.2f%%" (* 100 (/ (gnc:numeric-to-double (cadr (gaincoll 'getpair currency #f)))
-                                                                            (gnc:numeric-to-double (cadr (moneyincoll 'getpair currency #t)))))))
-                        )
-                      )
+			activecols)
 		      (table-add-stock-rows-internal rest (not odd-row?))
                 )
 		(table-add-stock-rows-internal rest odd-row?)
@@ -293,6 +326,14 @@
                                   optname-zero-shares))
         (include-gains (get-option gnc:pagename-general
                                   optname-include-gains))
+	(show-symbol (get-option gnc:pagename-display
+				  optname-show-symbol))
+	(show-listing (get-option gnc:pagename-display
+				  optname-show-listing))
+	(show-shares (get-option gnc:pagename-display
+				  optname-show-shares))
+	(show-price (get-option gnc:pagename-display
+				  optname-show-price))
 
         (total-value    (gnc:make-commodity-collector))
         (total-moneyin  (gnc:make-commodity-collector))
@@ -324,24 +365,26 @@
                     (gnc:pricedb-lookup-latest-any-currency pricedb foreign)))
                   ('pricedb-nearest 
                    (lambda (foreign date) 
-                    (gnc:pricedb-lookup-nearest-in-time-any-currency pricedb foreign date))))))
-          
-          (gnc:html-table-set-col-headers!
+                    (gnc:pricedb-lookup-nearest-in-time-any-currency pricedb foreign date)))))
+	       (activecols (list (_ "Account"))))
+	  
+          (if show-symbol (append! activecols (list (_ "Symbol"))))
+	  (if show-listing (append! activecols (list (_ "Listing"))))
+	  (if show-shares (append! activecols (list (_ "Shares"))))
+	  (if show-price (append! activecols (list (_ "Price"))))
+	  (append! activecols (list (_ "Value")
+				    (_ "Money In")
+				    (_ "Money Out")
+				    (_ "Gain")
+				    (_ "Total Return")))
+	  (gnc:html-table-set-col-headers!
            table
-           (list (_ "Account")
-                 (_ "Symbol")
-                 (_ "Listing")
-                 (_ "Shares")
-                 (_ "Price")
-                 (_ "Value")
-                 (_ "Money In")
-                 (_ "Money Out")
-                 (_ "Gain")
-                 (_ "Total Return")))
+           activecols)
           
           (table-add-stock-rows
            table accounts to-date currency price-fn exchange-fn
-           include-empty include-gains total-value total-moneyin total-moneyout total-gain)
+           include-empty include-gains show-symbol show-listing show-shares show-price
+	   total-value total-moneyin total-moneyout total-gain)
           
           (gnc:html-table-append-row/markup!
            table
