OK - I've thought about this. Please correct my logic if I am wrong!
- my new bizObj code is in biz - it is basically a clone of my existing
bizObj (but without the validation code etc) but is created seperately as
the data for the report may be selective while my main bizObj is all
inclusive.
- I can create the instance of this bizObj only after the selection
criteria has been entered ie in the FrmReport routine in ui. Since this is a
dDialog object self is referring to this dialog and I can do a self.refresh
to get my cursor.
- The getDataset routine in db can then read the cursor from the
bizObj on the FrmReport dialog (maybe I should just get the dataset within
the FrmReport object and don't worry about having a seperate routine in db?)
Thats the design stage - hopefully I have both concepts and philosophy right
here and I can go on to the coding/implementation now.
Rodgy
----- Original Message -----
From: "Roger Lovelock" <[email protected]>
To: "Dabo Users list" <[email protected]>
Sent: Sunday, December 14, 2008 8:39 AM
Subject: Re: [dabo-users] Fw: Running a Report
> I'm now moving on to changing the getDataset routine to get a fresh
> dataset from the database for each report run. In my tradition of re-using
> code I am doing the following :-
> - created a new Bizobj in biz (basically just a copy of my existing
> one - but as I want a different cursor I need a different Bizobj)
> - in my getDataset routine I have commented out my hard coded dataset.
> - in my getDataset I have inserted code copied from my form where the
> Bizobj is created as follows :-
> def createBizobjs(self):
> conn = self.Application.getConnectionByName("LodgeBooks")
> membershiptypesRptBizobj =
> self.Application.biz.MembershiptypesRptBizobj(conn)
> self.addBizobj(membershiptypesRptBizobj)
> self.requery()
> I then plan to set ds equal to the cursor generated.
>
> The thing is - in this code the self refers to the form (I think), which I
> am no longer in - I am just in a code routine resident in db. This isn't
> an object as such, so can I in fact create the Bizobj in it? This probably
> reveals some naivity on my part regarding oo programming (was brought up
> procedurally!) I don't think the solution is just to remove the 'self's -
> maybe I need to do these things within the form (either the main form or
> the report form). Sorry if this seems a bit elementary, but some guidance
> appreciated.
> Rodgy
> ----- Original Message -----
> From: "Paul McNett" <[email protected]>
> To: "Dabo Users list" <[email protected]>
> Sent: Sunday, December 14, 2008 2:08 AM
> Subject: Re: [dabo-users] Fw: Running a Report
>
>
>> Roger Lovelock wrote:
>>> Thanks Paul - I had come to the same conclusion (hence my last email),
>>> before I read this one!
>>
>> By the way, you are using the AppWizard *exactly* as I intended. Run it;
>> get a
>> working app fast; see what you can do; read the code; extract from that
>> code; build
>> your own base and expand from there, all the while learning how to code
>> in Dabo.
>>
>> 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/d801082ccb3244c5a3b1aed5468e6...@roger