4 Replies Latest reply on Mar 29, 2012 5:40 AM by crhmac

# Problems of Summary fields

Hi all.

I have a problem with subtotal field.

I have 3 Fields, total pago, total recebido and saldo for N accounts.

Total Pago is a calcutation Sum(saldo_dia_conta_mov_diaria::valor_pago_calculado) field located in a Subsummary

Total recebido is a calculation too Sum(saldo_dia_conta_mov_diaria cr::valor_recebido_calculado) both using a relatalionship.

Saldo only the diference between Pago - recebido, saldo_inicial_relacao + GetSummary (total_contas_recebidas_cr; conta_para_fluxo_de_caixa) - GetSummary ( total_contas_pagas; conta_para_fluxo_de_caixa)

Now I need ai Summary, total of the total pago, more total of the total recebido and total of the Saldo, but if I use example a field in Trailing Grand Summary the Total is always the Summary of total.

Exemplo:

Account 1 = Total Pago R\$ 200,00 Total Recebido R\$ 400 saldo = R\$ 200,00 OK.

Account 2 = Total Pago R\$ 100,00 Total Recebido R\$ 400 saldo = R\$ 300,00 OK.

Total = R\$ 300,00 Total = R\$ 800,00 Total = R\$ 500,00 ( my objetive)

But this total Summary Always the total of records in database and dont respect the relationship.

I hope has been clear.

Tks

• ###### 1. Re: Problems of Summary fields

Your sums appear to be totaling fields which are already summary-calculation totals.

Sums in subSummary parts depend on both proper sorting, and on being actual Sums of numbers/amounts, not sums of calculated sums.

If you retotal your calculated sum fields, you will get amounts which are too large, possibly the sum of all records, possibly even more, depending on howand what the calculated field is summarizing. (We cannot see your relationship structure to know what's being sumarized in the calcs across the various relationships.)

• ###### 2. Re: Problems of Summary fields

Hi Stephen.

Tks for your interested in help me.

I am sending 2 images of the report.

The First image of the report, OK no problem and don,t have problem.

The third image the total in the Footer, but the total is incorret, because the Sum is a Sum of total records of database.

This total field is a Summary field com Total of.

The Second a image of the Relationship.

The Field Total Pago and Total Recebido is a Sum by calcutation using by Relationship and I need use the relationship because a need of total paid and received by specific date, field date in header.

Now I need only to make a field to Sum each column in this Example, Sum of total pago = R\$ 33.00 Sum of total recebido = R\$ 542,49.... but this Sum not respect the relationship and Sum the total of records in database.

I need to create a field that sum only the value each column, no all records.

Tks for you help.

• ###### 3. Re: Problems of Summary fields

Try putting the final total as a sub-Summary field in a "Trailing Grand Total" layout part instead of the page footer. Use the same summary field you use in the sub-summary parts in the trailin grand total part.

Let's see if that makes a difference before trying to analyze the relationships and the calcs which summarize across them.

• ###### 4. Re: Problems of Summary fields

Tks Stephen.

Problem resolved.

Cláudio