domain: client
language: python
class Report class
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.
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())