Changes between Version 17 and Version 18 of S3/S3Report


Ignore:
Timestamp:
09/10/12 04:51:58 (8 years ago)
Author:
James O'Neill
Comment:

Add info about search option in report_options

Legend:

Unmodified
Added
Removed
Modified
  • S3/S3Report

    v17 v18  
    6363The `rows`, `cols`, `facts` and `aggregate` items are lists of available values for the user to select from.
    6464
    65 The `defaults` item is a Storage object that contains the default values for the report. It can contain a value for `rows`, `cols`, `fact`, `aggregate` and `totals` (as described in [#URLMethods URL Methods]).
     65The `defaults` property is a Storage object that contains the default values for the report. It can contain a value for `rows`, `cols`, `fact`, `aggregate` and `totals` (as described in [#URLMethods URL Methods]).
     66
     67The `search` property is a list of S3Search widgets that will allow the report to be filtered. If no `search` property is specified, no filter form will be available.
    6668
    6769Here is an example of a `report_options` item:
    6870{{{#!python
    69 report_options = Storage(
    70         rows = report_fields,
    71         cols = report_fields,
    72         facts = report_fields,
    73         defaults = Storage(
    74                 rows = "project_id",
    75                 cols = "name",
    76                 fact = "time_actual",
    77                 aggregate = "sum",
    78                 totals = True
    79         )
     71report_options=Storage(
     72        rows=report_fields,
     73        cols=report_fields,
     74        facts=report_fields,
     75        defaults=Storage(
     76                rows="project_id",
     77                cols="name",
     78                fact="time_actual",
     79                aggregate="sum",
     80                totals=True
     81        ),
     82        search=[
     83                S3SearchOptionsWidget(
     84                        name="project_id",
     85                        label = T("Project"),
     86                        field = "project_id",
     87                ),
     88        ],
     89)
    8090}}}
    8191