Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Having trouble with two tables

Status
Not open for further replies.

Rob2k2

Technical User
Oct 14, 2002
36
GB
I have two tables, master and compperfloat. I am using the record selection formula shown below:-

year({master.findate}) = 2002 and
month({master.findate}) = 10 and
{master.lender} <> 'AMC'

On the report page i have put {master.lender} one of the fields from the {master} table which returns 8922 rows which is correct.

Next to the {master.lender} field i have a field {float} with this formula:-

if {CompPerFLOAT.Month} = '10' and
{CompPerFLOAT.Year} = '2002' and
{CompPerFLOAT.ApptoTeam} = 'N' then {CompPerFLOAT.Lnamnt} else 0

What i want to do is only display the result from the above formula once per different lender so I can then group by {master.lender} and produce an overall total for the formula field.

Is there an easy way to achieve this?

 
I think a running total field is what you want.

Insert, running total field, make it a sum, evaluate once per group (by lender), reset = never.

Try this and let me know how it works. Software Sales, Training and Support for Macola, Crystal Reports and Goldmine
dgilsdorf@mchsi.com
 
Ok, have tried setting up a running total field, but the result is still way too large.

If I move the {master.lender} and the {float} field from the group header into the details section of the report, I get the following

Lender Float
BHF 1000
BHF 0
BHF 1000
BHF 0
etc

EPF 493000
EPF 0
EPF 0
EPF 493000
etc

I think this is where the problem lies
 
Its great that you told me what results you are getting, but what is WRONG with thsoe results? What are you expecting or hoping for?

On your running total field, did you reset the field based on the change of group=lender? Software Sales, Training and Support for Macola, Crystal Reports and Goldmine
dgilsdorf@mchsi.com
 
I would like the float to display a value only once per lender i.e. once for BHF, EPF etc. because at the minute it is just repeating the same value based on this formula:-

if {CompPerFLOAT.Month} = '10' and
{CompPerFLOAT.Year} = '2002' and
{CompPerFLOAT.ApptoTeam} = 'N' then {CompPerFLOAT.Lnamnt} else 0

so of there is a row which qualifies the if statement it will put the value in else it will put 0 in.
 
On your running total field, did you reset the field based on the change of group=lender?

Running totals are the solution to your problem.

If you'd like to email me the report with saved data, I will take a look at it. Software Sales, Training and Support for Macola, Crystal Reports and Goldmine
dgilsdorf@mchsi.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top