> Don't worry, this is really no problem. I do this stuff all the time.
>

Paul, thanks, this is reassuring.  It's good to know the only problem is me
getting my head around it.


>
> ...which is why they should be in a database. Do you not have a table for the
> loadports and stocktypes?

Yes and yes.
>
>
>
> > To produce this report I would normally make several sql calls:
> > 1. select * from Table1 where date=2005/01/10
> > 2. select stockType, info from Table2 where date=2005/01/10 and loadPort=X
> group
> > by stockType
> > (this would be run for each loadPort)
> > 3. select sum(info) from Table2 where where date>=2005/01/01 and
> > date<=2005/01/10 and loadPort=X group by stockType
> > (this would be run for each loadPort)
> >
> For Dabo, you just need to end up with a Python list of dicts, where each
> item
> in the list is a conceptual "record", and each dict has keys/values on
> fieldname/fieldvalue. You can construct this "dataset" manually, using the
> rules
> you mention above.
>

Ok, so instead of denormalising all of the above into one table (which is
possible, but not very practical), I can pass the results of each sql select as
a dictionary (which becomes a list of dictionaries).  This list of dictionaries
is then the cursor which is passed to reportwriter.

As these reports are the key to the whole project, I'm going to start working on
them first.

What I will do is:
1. create the database using embedded Firebird (this will be 2 main tables, with
about 20 tables for values to input into these 2 main tables (is there a term
for this?),
2. run AppWizardX (without any relationSpecs) and use the baseSQL override to
join FK's to the 2 main tables.
3. work out the sql/calculations necessary for the reports.

I notice that the expanded format of the QuickReport uses the layout of the edit
page.  So obviously, once I create a page which looks like my report, I can use
that to print.  Is this how I should proceed? If so, how do I set the
datasource?  What do I use for a data-aware label?

Many thanks.


Matthew.

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users

Reply via email to