Geraldo Reports Cheat-Sheet

## base

### BaseReport

- band_begin
- band_summary
- band_page_header
- band_page_footer
- band_detail
- groups
- queryset
- print_if_empty
- before_print
- before_generate
- after_print
- on_new_page
- borders
- default_font_color
- default_stroke_color
- default_fill_color

### Report(BaseReport)

- title
- author
- subject
- keywords
- page_size
- first_page_number
- additional_fonts
- default_style
- margin_top
- margin_bottom
- margin_left
- margin_right
- subreports
- cache_status
- cache_backend
- cache_prefix
- cache_file_root

### SubReport(BaseReport)

- queryset_string
- band_detail
- band_header
- band_footer
- visible
- get_queryset

### ReportGroup

- attribute_name
- band_header
- band_footer

### ReportBand

- height
- width
- visible
- borders
- elements
- child_bands
- force_new_page
- default_style
- auto_expand_height
- before_print
- after_print

### DetailBand(ReportBand)

- margin_top
- margin_bottom
- margin_left
- margin_right
- display_inline

### ManyElements

- element_class
- count
- start_left
- start_top
- visible
- element **kwargs

## base

### Element

- left
- top
- width
- height
- visible
- before_print
- after_print

## widgets

### Widget(Element)

- style
- truncate_overflow
- get_value
- instance
- report
- generator
- band

### Label(Widget)

- text

### ObjectValue(Label)

- attribute_name
- expression
- action
- display_format
- objects
- get_text
- stores_text_in_cache
- converts_decimal_to_float
- converts_float_to_decimal

### SystemField(Label)

- expression

## graphics

### Graphic(Element)

- stroke
- stroke_color
- stroke_width
- fill
- fill_color

### Rect(Graphic)

### RoundRect(Rect)

- radius

### Fixed(Graphic)

- left
- top
- right
- bottom

### Line(Fixed)

### Circle(Graphic)

- left_center
- top_center
- radius

### Arc(Fixed)

- start_angle
- extent

### Ellipse(Fixed)

### Image(Graphic)

- filename
- get_image

## cache

- FileCacheBackend
- CACHE_BACKEND
- CACHE_FILE_ROOT

### DEFAULT_CACHE_STATUS

- CACHE_DISABLED
- CACHE_BY_QUERYSET
- CACHE_BY_RENDER

## generators

### ReportGenerator

- cache_enabled
- first_page_number
- variables
- return_pages
- pages
- filename

### PDFGenerator(ReportGenerator)

- canvas
- return_canvas
- multiple_canvas

### TextGenerator(ReportGenerator)

- row_height
- character_width
- encode_to
- manual_escape_codes
- escapes_report_start
- escapes_report_end
- escapes_page_start
- escapes_page_end

## cross_reference

- CROSS_COLS
- CROSS_ROWS

### CrossReferenceMatrix

- .rows()
- .cols()
- .values()
- .max()
- .min()
- .sum()
- .avg()
- .count()
- .distinct_count()
- .percent()
- .first()
- .last()
- .matrix()
- .summarize_rows()
- .summarize_cols()
- .matrix()

## charts

- LineChart
- BarChart
- HorizontalBarChart
- SpiderChart
- PieChart
- DoughnutChart

## barcodes

- BarCode

### Available Types

- "Codabar"
- "Code11"
- "Code128"
- "EAN13"
- "EAN8"
- "Extended39"
- "Extended93"
- "FIM"
- "I2of5"
- "MSI"
- "POSTNET"
- "Standard39"
- "Standard93"
- "USPS_4State"

## exceptions

- EmptyQueryset
- ObjectNotFound
- ManyObjectsFound
- AttributeNotFound
- NotYetImplemented
- AbortEvent

## utils

### Auto-Dimensioning

- BAND_WIDTH
- BAND_HEIGHT

### ObjectValue Actions

- FIELD_ACTION_VALUES
- FIELD_ACTION_FIRST
- FIELD_ACTION_LAST
- FIELD_ACTION_VALUE
- FIELD_ACTION_COUNT
- FIELD_ACTION_AVG
- FIELD_ACTION_MIN
- FIELD_ACTION_MAX
- FIELD_ACTION_SUM
- FIELD_ACTION_DISTINCT_COUNT
- FIELD_ACTION_PERCENT

### Utilities

- @memoize
- @run_under_process

## reportlab

### reportlab.lib.units

- cm
- inch
- mm
- pica

### reportlab.lib.pagesizes

- A0
- A1
- A2
- A3
- A4
- A5
- A6
- letter
- legal
- elevenSeventeen
- landscape(page size)
- portrait(page size)

### reportlab.lib.colors

- Color
- CMYKColor(c, m, y, k)
- HexColor('#ffffff')
- black
- white
- blue
- red
- yellow
- green
- ...

## very simple example

    from geraldo import *
    from geraldo.generators import *
    from geraldo.utils import cm

    class LettersReport(Report):
     class band_detail(DetailBand):
      height=0.7*cm
      elements=[ObjectValue(attribute_name='l')]

    objs = [{'l': 'A'}, {'l': 'B'}, {'l': 'C'}]
    r = LettersReport(queryset=objs)
    r.generate_by(PDFGenerator,filename='r.pdf')