Login

Tag "geraldo"

Snippet List

Vertical and Horizontal Line to geraldo report

It's fixed the right and bottom for each use. A vertical line is a line with the same right and left, so it fixed the right attribute to be the same value of the left attribute. A horizontal line is a line with the same bottom and top, so it fixed the bottom to be the same value of the top attribute.

  • geraldo
  • report
Read More

Widget for Money values on Geraldo Reports

This is a widget for decimal/money/currency fields on **Geraldo Reports**. When you use Geraldo to write reports, decimal fields must be formatted using **get_value** lambda attribute, because ObjectValue doesn't know what mask you want to use. With this widget, you just copy it into a common use Python file, import into your reports file and use it replacing ObjectValue on elements for fields you must be formatted as money format. **Example:** from geraldo import Report, ReportBand, ObjectValue from utils.reports import DecimalObjectValue class ReportCustomers(Report): title = u'Customers List' page_size = A4 class band_detail(ReportBand): height = 0.5*cm elements = [ ObjectValue(attribute_name='id', top=0.1*cm), DecimalObjectValue(attribute_name='salary', left=26.2*cm, top=0.1*cm, format='%0.03f'), ]

  • geraldo
Read More

Widget for DateTime values on Geraldo Reports

This is a widget for date/time fields on **Geraldo Reports**. When you use Geraldo to write reports, date/time fields must be formatted using **get_value** lambda attribute, because ObjectValue doesn't know what mask you want to use. With this widget, you just copy it into a common use Python file, import into your reports file and use it replacing ObjectValue on elements for fields you must be formatted as date/time format. **Example:** from geraldo import Report, ReportBand, ObjectValue, landscape from utils.reports import DateTimeObjectValue class ReportPhoneList(Report): title = u'Phone List' page_size = landscape(A4) class band_detail(ReportBand): height = 0.5*cm elements = [ ObjectValue(attribute_name='id', top=0.1*cm), DateTimeObjectValue(attribute_name='birth_date', left=26.2*cm, top=0.1*cm, format='%m/%d/%Y'), ]

  • geraldo
Read More

3 snippets posted so far.