Get total of field in report header

  • Thread starter Thread starter Boss
  • Start date Start date
B

Boss

Hi,

The whole databse is ready but i am stuck on this... please help..

I have a table with fields "totaltimetaken " and "Averagetime"

I need to get this on report header

(totaltimetaken/Averagetime)*100 which gives me overall productivity.

I did - Sum ( [TABLENAME]![totaltimetaken ] ) / Sum (
[TABLENAME]![Averagetime] ) but it didnt worked.

Even the sum function is not working. please help.

Thanks!
Boss
 
Hi,

thanks for the reply... but it didnt worked.. it is asking for parameter
value...

please adivse..

Thansk!
Boss


golfinray said:
Try: =(([totaltimetaken]/[averagetime])*100)
--
Milton Purdy
ACCESS
State of Arkansas


Boss said:
Hi,

The whole databse is ready but i am stuck on this... please help..

I have a table with fields "totaltimetaken " and "Averagetime"

I need to get this on report header

(totaltimetaken/Averagetime)*100 which gives me overall productivity.

I did - Sum ( [TABLENAME]![totaltimetaken ] ) / Sum (
[TABLENAME]![Averagetime] ) but it didnt worked.

Even the sum function is not working. please help.

Thanks!
Boss
 
Hi,

thanks for the reply... but it didnt worked.. it is asking for parameter
value...

please adivse..

Thansk!
Boss


golfinray said:
Try: =(([totaltimetaken]/[averagetime])*100)
--
Milton Purdy
ACCESS
State of Arkansas


Boss said:
Hi,

The whole databse is ready but i am stuck on this... please help..

I have a table with fields "totaltimetaken " and "Averagetime"

I need to get this on report header

(totaltimetaken/Averagetime)*100 which gives me overall productivity.

I did - Sum ( [TABLENAME]![totaltimetaken ] ) / Sum (
[TABLENAME]![Averagetime] ) but it didnt worked.

Even the sum function is not working. please help.

Thanks!
Boss
 
Try this in the Report Header (not PAGE Header). You shouldn't use the table
names in your expressions. This assumes you have these two numeric fields in
your report's record source.

=Sum([totaltimetaken])/Sum([Averagetime]) * 100
--
Duane Hookom
Microsoft Access MVP


Boss said:
Hi,

thanks for the reply... but it didnt worked.. it is asking for parameter
value...

please adivse..

Thansk!
Boss


golfinray said:
Try: =(([totaltimetaken]/[averagetime])*100)
--
Milton Purdy
ACCESS
State of Arkansas


Boss said:
Hi,

The whole databse is ready but i am stuck on this... please help..

I have a table with fields "totaltimetaken " and "Averagetime"

I need to get this on report header

(totaltimetaken/Averagetime)*100 which gives me overall productivity.

I did - Sum ( [TABLENAME]![totaltimetaken ] ) / Sum (
[TABLENAME]![Averagetime] ) but it didnt worked.

Even the sum function is not working. please help.

Thanks!
Boss
 
Try this in the Report Header (not PAGE Header). You shouldn't use the table
names in your expressions. This assumes you have these two numeric fields in
your report's record source.

=Sum([totaltimetaken])/Sum([Averagetime]) * 100
--
Duane Hookom
Microsoft Access MVP


Boss said:
Hi,

thanks for the reply... but it didnt worked.. it is asking for parameter
value...

please adivse..

Thansk!
Boss


golfinray said:
Try: =(([totaltimetaken]/[averagetime])*100)
--
Milton Purdy
ACCESS
State of Arkansas


Boss said:
Hi,

The whole databse is ready but i am stuck on this... please help..

I have a table with fields "totaltimetaken " and "Averagetime"

I need to get this on report header

(totaltimetaken/Averagetime)*100 which gives me overall productivity.

I did - Sum ( [TABLENAME]![totaltimetaken ] ) / Sum (
[TABLENAME]![Averagetime] ) but it didnt worked.

Even the sum function is not working. please help.

Thanks!
Boss
 
Perhaps you need to use the Dsum function

=DSum("TotalTimeTaken","TableName")/DSum("AverageTime","TableName")

That will get the sums for all records in the table. If you need to
restrict the calculation to just the records used in the report, you can
modify the DSUM functions by adding the criteria argument (basically a
where clause without the word WHERE")

OR you can use
=(Sum([totaltimetaken])/Sum([averagetime]))*100
That assumes that you have two fields in the reports record source named
TotalTimeTaken and AverageTime and not two controls with that name.

'====================================================
John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
'====================================================

Hi,

thanks for the reply... but it didnt worked.. it is asking for parameter
value...

please adivse..

Thansk!
Boss


golfinray said:
Try: =(([totaltimetaken]/[averagetime])*100)
--
Milton Purdy
ACCESS
State of Arkansas


Boss said:
Hi,

The whole databse is ready but i am stuck on this... please help..

I have a table with fields "totaltimetaken " and "Averagetime"

I need to get this on report header

(totaltimetaken/Averagetime)*100 which gives me overall productivity.

I did - Sum ( [TABLENAME]![totaltimetaken ] ) / Sum (
[TABLENAME]![Averagetime] ) but it didnt worked.

Even the sum function is not working. please help.

Thanks!
Boss
 
Perhaps you need to use the Dsum function

=DSum("TotalTimeTaken","TableName")/DSum("AverageTime","TableName")

That will get the sums for all records in the table. If you need to
restrict the calculation to just the records used in the report, you can
modify the DSUM functions by adding the criteria argument (basically a
where clause without the word WHERE")

OR you can use
=(Sum([totaltimetaken])/Sum([averagetime]))*100
That assumes that you have two fields in the reports record source named
TotalTimeTaken and AverageTime and not two controls with that name.

'====================================================
John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
'====================================================

Hi,

thanks for the reply... but it didnt worked.. it is asking for parameter
value...

please adivse..

Thansk!
Boss


golfinray said:
Try: =(([totaltimetaken]/[averagetime])*100)
--
Milton Purdy
ACCESS
State of Arkansas


Boss said:
Hi,

The whole databse is ready but i am stuck on this... please help..

I have a table with fields "totaltimetaken " and "Averagetime"

I need to get this on report header

(totaltimetaken/Averagetime)*100 which gives me overall productivity.

I did - Sum ( [TABLENAME]![totaltimetaken ] ) / Sum (
[TABLENAME]![Averagetime] ) but it didnt worked.

Even the sum function is not working. please help.

Thanks!
Boss
 
Thankyou all very much...

Now i understand there is no small mistake..

I missed the numeric fields in the report's record source.

Thanks!


John Spencer said:
Perhaps you need to use the Dsum function

=DSum("TotalTimeTaken","TableName")/DSum("AverageTime","TableName")

That will get the sums for all records in the table. If you need to
restrict the calculation to just the records used in the report, you can
modify the DSUM functions by adding the criteria argument (basically a
where clause without the word WHERE")

OR you can use
=(Sum([totaltimetaken])/Sum([averagetime]))*100
That assumes that you have two fields in the reports record source named
TotalTimeTaken and AverageTime and not two controls with that name.

'====================================================
John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
'====================================================

Hi,

thanks for the reply... but it didnt worked.. it is asking for parameter
value...

please adivse..

Thansk!
Boss


golfinray said:
Try: =(([totaltimetaken]/[averagetime])*100)
--
Milton Purdy
ACCESS
State of Arkansas


:

Hi,

The whole databse is ready but i am stuck on this... please help..

I have a table with fields "totaltimetaken " and "Averagetime"

I need to get this on report header

(totaltimetaken/Averagetime)*100 which gives me overall productivity.

I did - Sum ( [TABLENAME]![totaltimetaken ] ) / Sum (
[TABLENAME]![Averagetime] ) but it didnt worked.

Even the sum function is not working. please help.

Thanks!
Boss
 
Thankyou all very much...

Now i understand there is no small mistake..

I missed the numeric fields in the report's record source.

Thanks!


John Spencer said:
Perhaps you need to use the Dsum function

=DSum("TotalTimeTaken","TableName")/DSum("AverageTime","TableName")

That will get the sums for all records in the table. If you need to
restrict the calculation to just the records used in the report, you can
modify the DSUM functions by adding the criteria argument (basically a
where clause without the word WHERE")

OR you can use
=(Sum([totaltimetaken])/Sum([averagetime]))*100
That assumes that you have two fields in the reports record source named
TotalTimeTaken and AverageTime and not two controls with that name.

'====================================================
John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
'====================================================

Hi,

thanks for the reply... but it didnt worked.. it is asking for parameter
value...

please adivse..

Thansk!
Boss


golfinray said:
Try: =(([totaltimetaken]/[averagetime])*100)
--
Milton Purdy
ACCESS
State of Arkansas


:

Hi,

The whole databse is ready but i am stuck on this... please help..

I have a table with fields "totaltimetaken " and "Averagetime"

I need to get this on report header

(totaltimetaken/Averagetime)*100 which gives me overall productivity.

I did - Sum ( [TABLENAME]![totaltimetaken ] ) / Sum (
[TABLENAME]![Averagetime] ) but it didnt worked.

Even the sum function is not working. please help.

Thanks!
Boss
 
Back
Top