Задать вопрос

Тел: +7 965 3737 888





Widget for DateTime values on Geraldo Reports

<p>This is a widget for date/time fields on <strong>Geraldo Reports</strong>.</p>
<p>When you use Geraldo to write reports, date/time fields must be formatted using <strong>get_value</strong> lambda attribute, because ObjectValue doesn't know what mask you want to use.</p>
<p>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.</p>
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),
                left=26.2*cm, top=0.1*cm, format='%m/%d/%Y'),

Вопрос полезен? Да0/Нет0

Ответы (1):

Ответ полезен? Да0/Нет0

Hi All, Can anyone suggest how to rounded off a number to a near integer value in Geraldo reports. I am unable to do this and could not find any snippets as well. I am using Django with Geraldo report to print PDF reports.

If anyone provide quick response on this appreciated.

Thanks, Surabhi