Changes between Version 5 and Version 6 of S3XRC/ResourceReport


Ignore:
Timestamp:
08/28/10 10:19:34 (14 years ago)
Author:
Dominic König
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • S3XRC/ResourceReport

    v5 v6  
    9090def shn_xxx_yyy_report(r, **attr):
    9191
    92     resource = r.resource
     92    resource = r.resource # <== Get the resource
    9393
    9494    if r.representation == "html":
    9595
    96         # Get all records
    97         rows = resource.records()
     96        rows = resource.records() # <== get all records
    9897
    9998    elif r.representation == "xls":
     99
     100        for record in resource: # <== interate through the records
     101            ...
     102
     103    elif r.representation == "pdf":
    100104
    101105        # Access components record-wise:
     
    104108            for component_record in component_set:
    105109                ...
    106 
    107     elif r.representation == "pdf":
    108 
    109         # Iterate through the records:
    110         for record in resource:
    111             ...
    112110
    113111    elif r.representation == "svg":
     
    118116        resource.build_query(filter = filter)
    119117
    120         # Iterate through the records:
     118        # ...and then iterate through the records:
    121119        for record in resource:
    122120            ...
     
    132130...to be continued...
    133131...to be continued...
     132...to be continued...