On 9/9/10 4:24 PM, Nate Lowrie wrote:
> On Thu, Sep 9, 2010 at 14:37, Paul McNett<[email protected]>  wrote:
>> To see how to programatically run a report, see the invoice sample, 
>> invoice.py.
>>
>> No, there is nothing built into dabo for previewing/printing reports however 
>> there
>> are supporting functions in dabo.lib.reportUtils.
>>
>> I've made my own FrmReport that I subclass for each report.
>
> What does the form do?  Is it just a preview window?

The baseclass has 2 buttons: print and preview along with various properties 
for 
setting the report form file and getting the dataset from the proper bizobj(s). 
Subclasses usually add specific input fields for the user to enter, e.g. the 
invoice 
date, customer, etc.

Hitting "preview" or "print" runs the report and calls either 
reportUtils.previewPDF() or printPDF().

> On another note, a couple of more questions:
>     1) When would you use a paragraph versus a string?
Excellent question, in an ideal world you'd just use string objects that are 
smart 
enough to wrap when needed. But for now you must use paragraph if you have the 
possibility of the text wanting to wrap. Use string if you can get away with it 
because it is simpler.

>     2) When would you use a spanning line or spanning rectangle?

Use them to draw lines or rectangles from the group or page header to the group 
or 
page footer. They will grow as needed to accomodate however many records 
(detail band 
iterations) are in between them.

>     3) When you specify a string in the Report Begin session and set it
> to a value in the record that will always be the same (order number
> for instance), which record in the dataSet does it actually use?

Whatever record it is on at the time. In ReportBegin, it'll be record 0 since 
that 
band only prints at the beginning of the report. In ReportEnd, it'll be the 
last 
record. I think you want to be using PageHeader or a group header to print the 
order 
number, since those will or can be set to print on every page with the current 
record's value.

Paul
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/[email protected]

Reply via email to