[EMAIL PROTECTED] wrote:
AppWizardX works well. But not with the Firebird database (a long list of
errors when trying to start the app created).
Hmm, I don't use firebird so would you mind attaching the entire traceback?
I have also noticed that the app created does not update the database.
Just in firebird?
Just noticed that while the errors in my previous post occur, the app still
works. What happens is that after re-querying it remains on the search page.
Because of the wx event loop, any tracebacks that occur will not end the program
right then and there. But the app is in an unknown state because any code after
the exception was raised would not have been run.
Also, for AppWizardX, it works for only one table (and fails completely if
relationSpecs are set). What should I do for multiple tables?
Wait for me to get relations implemented. Sorry. Multiple non-related tables
should work fine, though.
For instance, this line at the end of my FrmClients.afterInit() adds a page
that
I've defined to list the client's activity and report their current balance:
self.PageFrame.appendPage(PagClientBalance, "Balance")
I've been trying to simulate this. If I add the following code the app runs,
but I can't see the page:
PageFrame=dabo.ui.dPageFrame(self)
self.dPageFrame.appendPage(self.Application.ui.PagClientBalance,
"Balance")
To get it running I've copied your PagEditClient.py as PagClientBalance.py. What
am I doing wrong?
Don't create a new pageframe, use the PageFrame as already set up by the form.
In the form's afterInit(), try this:
self.PageFrame.appendPage(self.Application.ui.PagClientBalance,
"Balance")
> 2. I need to customise the search page to search on foreign keys with
> drop down menus. The options in FieldSpecEditor seem limited. How can
> I add custom fields to configure the search form (and also the entry
> form) to a greater degree
I'm working on giving user code a hook into the search options, so stay tuned
on
that.
In the meantime, how can I over-ride the search page?
Well, you'd have to remove the default search page and add your own, which isn't
trivial. The code for the search page is located in dabo/lib/datanav/Page.py, in
class PagSelect.
As far as the edit page goes, you can override that by changing your
form
code (located in ui/Frm*.py, where * is the name of the table) to something
like
(my example is with FrmClients):
<Snip>
This worked really well. I've changed it for the Customers table, and added a
drop down just to see how that would work. Seems quite easy.
Glad to hear. My goal is to make this as easy WRT the search page.
> 3. Many of the reports I will need to produce involve joins from
> several tables. For example, a report of each orditem with the total
> number of orders. Where would such code go
Multi-table joins aren't a problem, that is a common need. What the runtime
ReportWriter needs is a single dataset (denormalize your multiple tables into
one dataset with repeated values in the proper order for consumption by the
report writer), and a report format xml file (rfxml). The rfxml has sections
for
<Snip>
Return everything in one dataset. Using your Invoice as an example, each
Invoice would have:
- customer details
- multiple order details
Could this be passed in one dataset? If I was doing this at present with my
web-app, I would just make two sql calls.
Perhaps in a later incarnation of the report writer, it will be able to handle
linked cursors or bizobjs. But for now, it needs a single denormalized dataset.
For instance, the type of dataset you'd get with the following hypothetical sql
statement:
select customer.name as custname,
invoice.number as invnum,
invoice.date as invdate,
invoiceline.description as linedescrp,
invoiceline.amount as lineamount
from customer
inner join invoice
on invoice.custid = customer.id
left join invoiceline
on invoiceline.invoiceid = invoice.id
group by customer.id, invoice.id, invoiceline.id
order by customer.name, invoice.date, invoiceline.id
Thanks for your patience and help.
Thanks for giving Dabo a go!
--
Paul McNett
http://paulmcnett.com
http://dabodev.com
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users