Right - obvious when you point it out!
Thanks
Rodgy
----- Original Message -----
From: "Paul McNett" <[email protected]>
To: "Dabo Users list" <[email protected]>
Sent: Tuesday, December 16, 2008 3:46 PM
Subject: Re: [dabo-users] Fw: Fw: Running a Report
> Roger Lovelock wrote:
>> A breakthrough (I hope)!
>>
>> Modified code as follows, on the assumption that I was effectively
>> creating
>> a new attribute for the modal dialog.
>>
>> # -*- coding: utf-8 -*-
>>
>> import datetime
>> import os
>> import dabo.ui
>> from FrmReportBase import FrmReportBase
>>
>>
>> class FrmReport(FrmReportBase):
>>
>> def initProperties(self):
>> app = self.Application
>> self.ReportName = "Membership Types Report"
>> self.super()
>> self.ReportForm = os.path.join(app.HomeDirectory,
>>
>> "reports/membershipTypesRpt.rfxml")
>>
>> def createBizobjs(self):
>> app = self.Application
>> conn = app.getConnectionByName("LodgeBooks")
>> membershiptypesRptBizobj = app.biz.MembershiptypesBizobj(conn)
>> self.myBizobj = membershiptypesRptBizobj
>> self.myBizobj.requery()
>>
>> def addControls(self):
>> # add any controls for selection criteria
>> self.super()
>>
>> def requery(self):
>> # pass any selection criteria here
>> self.DataSet = self.myBizobj.getDataSet()
>>
>> I guess this works because while dDialog doesn't have an addBizobj method
>> it
>> is smart enough to know what self.DataSet is once I have created a bizObj
>> &
>> added a reference in the dialog to it (if that makes sense - its sounding
>> a
>> bit confused to me).
>
> self.DataSet is defined in FrmReportBase, a property. All you are doing is
> getting
> the dataset from the bizobj, and placing it into self.DataSet where
> FrmReportBase
> knows to look for it.
>
> Paul
>
>
[excessive quoting removed by server]
_______________________________________________
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/af7d64aae3ff4bd68ac8a389d316d...@roger