calculate table fields in the report

miketamp

Registered User.
Local time
Today, 07:27
Joined
Mar 30, 2005
Messages
22
Hi there.
I have two tables in my database. the first one called "customers" where the customer's data goes. the second called "kiniseis" and there are connected together.

The table “kinisis” has two fields the first one called “phre” and the second called “edose”

When my customer buy something from my shop which cost for example 1000€, that goes in the field “phre”. When my customer brings money for me, for example 500€, that goes in the field “edose”.

I want to make a report where I can see which customers own money to me. which means that the report has to find for every movement for every customer,
phre-edose>0

How can I do that?
 
ok what you need on your report is


Phre edose
1000 500

now on your report you need to toal these two colosms
totals = sum[phre] then minis one from the other = net due
 
You say that table “kinisis” has 2 fields, what is the join to the customer table, how are the customers identified as unique?

Brian
 
the customer with the kinisis are connected through the code_cust field.
the problem is that in the report i need to have all the customers that own to me only their names and the total amount that they own to me. i dont want to make a report for each one
 

Attachments

  • tables.JPG
    tables.JPG
    12.8 KB · Views: 148
Query1 a totals query on kinisis
Cust_code Groupby
phre sum
edose sum

query2
join query1 to customer table on cust_code
Select customer details, sumofphre, sumofedose
create newfield Total:sumofphre-sumofedose


base the report on this query

Brian
 
There is nothing more to be specific about, I assume that you know how to do a totals query and how to join tables/queries, and its all explained in Help.

Brian
 

Users who are viewing this thread

Back
Top Bottom