Home > Archive > Getting Started with dBASE > January 2006 > totals in reports









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author totals in reports
doug

2006-01-23, 1:23 pm

I made a report based on one table (in other words the groups and summaries list has fields based on that table) and I want to make a total of a field located in another table. This table is the parent of the table where the field is located. I can't use
the add groups and summaries option to create the total. How do I make the total for the report?
Michael Nuwer [dBVIPS]

2006-01-23, 1:23 pm

doug wrote:
> I made a report based on one table (in other words the groups and summaries list has fields based on that table) and I want to make a total of a field located in another table. This table is the parent of the table where the field is located. I can't us

e the add groups and summaries option to create the total. How do I make the total for the report?


The invoice report in the dBASE Plus Tutorial has an example of this. In
that project there is an "orders" table (the parent) and "lineitem"
table (the child). The following is used to sum rows in the child table.

text = {||this.parent.parent.agSum(
{||this.parent.rowset.parent.parent.lineitem1.rowset.fields[ "qty"].value})}

where:

{||this.parent.parent.agSum(

this=textObject
parent1=groupFooterB
and
parent2=GroupObject

{||this.parent.rowset.parent.parent.lineitem1.rowset.fields[ "qty"].value})}

this=GroupObject
parent1=Streamsource
Object
rowset= the object assigned to Steramsource.rowset
parent2=the query object
parent3=the Datamodule object
lineitem1=the query object contained in the datamodule

If you are not using a datamodule, then your path to the child table
will be a bit different.
doug

2006-01-23, 8:23 pm

Michael Nuwer [dBVIPS] Wrote:

> doug wrote:
use the add groups and summaries option to create the total. How do I make the total for the report?[color=darkred]
>
>
> The invoice report in the dBASE Plus Tutorial has an example of this. In
> that project there is an "orders" table (the parent) and "lineitem"
> table (the child). The following is used to sum rows in the child table.
>
> text = {||this.parent.parent.agSum(
> {||this.parent.rowset.parent.parent.lineitem1.rowset.fields[ "qty"].value})}
>
> where:
>
> {||this.parent.parent.agSum(
>
> this=textObject
> parent1=groupFooterB
and
> parent2=GroupObject
>
> {||this.parent.rowset.parent.parent.lineitem1.rowset.fields[ "qty"].value})}
>
> this=GroupObject
> parent1=Streamsource
Object
> rowset= the object assigned to Steramsource.rowset
> parent2=the query object
> parent3=the Datamodule object
> lineitem1=the query object contained in the datamodule
>
> If you are not using a datamodule, then your path to the child table
> will be a bit different.


I assume lineitem1 is the child table, from which you create a total on the field found in there.

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com