Jam.py
  • Jam.py documentation
  • Getting started
  • Jam.py programming
  • Jam.py FAQ
  • How to
  • Business application builder
  • Jam.py class reference
    • Client side (javascript) class reference
    • Server side (python) class reference
      • App class
      • AbstractItem class
      • Task class
      • Group class
      • Item class
      • Detail class
      • Reports class
      • Report class
        • Report
        • Attributes
        • Mehods
        • Events
      • Field class
      • Filter class
  • Release notes
Jam.py
  • »
  • Jam.py class reference »
  • Server side (python) class reference »
  • Report class »
  • print_band

print_band¶

print_band(self, band, dic=None)¶

domain: client

language: python

class Report class

Description¶

Use print_band method to set values of programmable cells of the band defined in the report template and add the band to the content of the report.

It has the following parameters:

  • band - specifies the name of the band to be printed.

  • dic - dictionary, containing values than will be assigned to programmable cells of the band.

Example¶

The following code generates content of the Customer list report of the Demo application:

def on_generate(report):
    cust = report.task.customers.copy()
    cust.open()

    report.print_band('title')

    for c in cust:
        firstname = c.firstname.display_text
        lastname = c.lastname.display_text
        company = c.company.display_text
        country = c.country.display_text
        address = c.address.display_text
        phone = c.phone.display_text
        email = c.email.display_text
        report.print_band('detail', locals())

See also¶

Programming reports

Report templates

Server-side report programming

generate

on_generate

Previous Next

© Copyright 2022, Jam.py Team. Last updated on Oct 14, 2024.

Built with Sphinx using a theme provided by Read the Docs.