On 9/9/10 9:55 AM, Nate Lowrie wrote: > On Thu, Sep 9, 2010 at 12:20, Paul McNett<[email protected]> wrote: >> On 9/9/10 9:11 AM, Nate Lowrie wrote: >>> Does anyone have a sample report for an order invoice? >> >> See dabo/dabo/lib/reporting_tests/invoice >> > > Missed that. It looks good though I am not sure how the parent child > relationship functions... > > I am assuming that the orderlines/order tables need to be > de-normalized to a single set?
Yes. It is simpler than it sounds. >>> Also, a report >>> that can pull from 2 separate tables (not a parent/child >>> relationship)? >> >> What you should do is denormalize your data into one big unioned dataset. >> Feed that >> to the Cursor property. > > That could get really ugly since I wanted to pull multiple rows for > each table and one of the tables had a parent child relationship on > it. Why this design instead of allowing for multiple tables like > Crystal? Because I wanted to attain complete separation of data and report form and keep report expressions as simple as possible. > On another note, is there a way to pass variables into a report or to > set report variables dynamically? Yes. Tell me specifically what variables you are wanting to set and I'll tell you the best way. Report expressions can access the application object like: <expr>self.Application.<myfunc>()</expr> If you instantiate the report writer at runtime and assign an attribute, like: def test(arg1): return "Hi, %s" % arg1 rw = dabo.dReportWriter() rw.myMeth = test You can then refer to that in an expression like: <expr>"Value of dynamic function: '%s'" % self.myMeth(self.RecordNumber)</expr> If you want subtotals of line items, you should definitely use Report Variables, which is what they are designed for. 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] _______________________________________________ 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]
