SummaryReportView

SummaryReportView

Superclass
View

Subclasses
none

Referenced By
SummaryReportModel, VehicleSummaryReport, SummaryReportView, EditorValues,
TBUBurdenPlan

SummaryReportView displays a summary report. This is a very generic reporting system that
either takes
a 2DList of values to display with labels, formatters, group by columns, etc or it can take
a query from
QueryObjects and infer the labels etc.  There are several parameters that specify the
report:

Instance Variables
labels <Array of: Label> [column labels of the report]
positions <Array of: Symbol> [array of items (#left #right #center) that describes how each column is aligned]
mappings <aClass> [description]
widths <aClass> [description]
height <aClass> [description]
labelHeight <aClass> [description]
width <aClass> [description]
formatters <Array of: PrintConverter> [array of PrintConverters that will format each column] initialValues <array of: <String | Integer>> [array of initial values used for summarizing the report (e.g., '', 0, etc.)]
summaryBlocks <Array of: Blocks> [array of blocks used for summarizing the report. These blocks act like inject into blocks in that the first argument is the current sum and the second is the current element (e.g., [:sum :each | sum + each])]
outputs <aClass> [description]
summary <aClass> [description]
selection <aClass> [description]
groupByColumns <Array of: Integer> [array of column number that correspond to the columns to summarize. The items in the SelectionInList should be ordered to fit the summary columns]
noScroll <aClass> [description]
calculatedColumns <aClass> [description] You can send the report to a printer by sending it the #print message. It prints as many rows and columns on each page without cutting a row or column. The reports columns can be rearranged, resized, and added/removed from the report. Here is an example use though see the instance-creation methods and the example methods for more details: " | view window topView edgeDec | view := ColumnLabelView new. view labels: (Array with: 'Name' asComposedText with: 'Hours' asComposedText). view positions: #(#left #right). view formatters: (Array with: (PrintConverter for: #string) with: (PrintConverter for: #number withFormatString: '$#,##0;[Red]($#,##0)')). view groupByColumns: #(1). view initialValues: #('' 0) summaryBlocks: (Array with: [:v :e | v] with: [:v :e | v + e]). view model: (SelectionInList new listHolder: #(#('Fred' 40) #('Fred' 35) #('Barney' 23) #('Wilma' 32) #('Wilma' 12)) asList). 'The view is setup so just open the window.'. window := ScheduledWindow new. topView := CompositePart new. edgeDec := LookPreferences edgeDecorator onScroller: (DataSetScrollWrapper on: view). edgeDec useHorizontalScrollBar. topView add: edgeDec in: ((LayoutFrame new) leftOffset: 0; topOffset: 0; rightFraction: 1; bottomFraction: 1). window component: topView. window open" See the many examples and instance creation methods for more advance use. Created by John Brant (brant@cs.uiuc.edu) Changes were made by Joseph W. Yoder (yoder@cs.uiuc.edu)

Potential problems with this comment:
	Variable has invalid type - 
		#('labelHeight' 'aClass'), #('width' 'aClass'), #('widths' 'aClass'), 
		#('outputs' 'aClass'), #('summary' 'aClass'), #('height' 'aClass'), 
		#('summaryBlocks' 'Array of: Blocks'), #('mappings' 'aClass'), 
		#('noScroll' 'aClass'), #('selection' 'aClass'), #('calculatedColumns' 'aClass')
	Instance variable not commented - 
		initialValues