 
 (defvar ledger-report-mode-abbrev-table)
 
+(defun ledger-report-reverse-lines ()
+  (interactive)
+  (goto-char (point-min))
+  (forward-paragraph)
+  (next-line)
+  (save-excursion
+    (setq inhibit-read-only t)
+    (reverse-region (point) (point-max))))
+
 (define-derived-mode ledger-report-mode text-mode "Ledger-Report"
    "A mode for viewing ledger reports."
    (let ((map (make-sparse-keymap)))
      (define-key map [? ] 'scroll-up)
      (define-key map [backspace] 'scroll-down)
      (define-key map [?r] 'ledger-report-redo)
+     (define-key map [?R] 'ledger-report-reverse-lines)
      (define-key map [?s] 'ledger-report-save)
      (define-key map [?k] 'ledger-report-kill)
      (define-key map [?e] 'ledger-report-edit)

     (define-key map [menu-bar ldg-rep vis] '("Visit Source" . ledger-report-visit-source))
     (define-key map [menu-bar ldg-rep lru] '("Scroll Up" . scroll-up))
     (define-key map [menu-bar ldg-rep s1] '("--"))
     (define-key map [menu-bar ldg-rep lrk] '("Kill Report" . ledger-report-kill))
     (define-key map [menu-bar ldg-rep lrr] '("Re-run Report" . ledger-report-redo))
     (define-key map [menu-bar ldg-rep lre] '("Edit Report" . ledger-report-edit))

  (save-match-data
    (let ((expanded-cmd report-cmd))
      (set-match-data (list 0 0))
      (while (string-match "%(\\([^)]*\\))" expanded-cmd (if (> (length expanded-cmd) (match-end 0))
							     (match-end 0)
							     (1- (length expanded-cmd))))
	(let* ((specifier (match-string 1 expanded-cmd))
	       (f (cdr (assoc specifier ledger-report-format-specifiers))))
	  (if f
