Calculating and displaying a total from a date range.

Getting your data onto paper - or the web - Discussing the reports features of Base

Calculating and displaying a total from a date range.

Postby nortski » Tue May 20, 2008 8:08 pm

Hi all,

I'm having difficulty generating a total from a list of amounts generated from a date range. I've set up a query that asks for a date range to display the required records. I've built a form from this query and it works fine. I've inserted a numeric box in the report and tried the following code entered into the form/data tab:

SELECT SUM( "expenceAmount" ) AS "TotalForReport" FROM "expencesTable"

Then in Control/Data/Data Field:

TotalForReport

However, this just gives me the total amount in the whole table.

Does anyone know what I'm doing wrong? If so, please tell me as I'm tearing my hair out!!!! It would be greatly appreciated!

Regards,
Nortski.
nortski
 
Posts: 3
Joined: Tue May 20, 2008 7:54 pm

Re: Calculating and displaying a total from a date range.

Postby wurzel » Sat May 31, 2008 8:48 pm

Hi,

I might have misunderstood something here, but your date range query is stored somewhere, right ?
It is this query that you need to reference in your report or use as the basis for your report. From your select statement, it appears that you are summing the "expenceTable" and not the subselect query that is the result of the date range variable.

Alex
wurzel
Volunteer
 
Posts: 145
Joined: Sun Dec 09, 2007 10:39 am


Return to Reporting

Who is online

Users browsing this forum: No registered users and 1 guest