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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using information from 2 unlinked Tables!

Status
Not open for further replies.

johnvai

IS-IT--Management
Oct 4, 2003
127
LB
Dear Friends:

I just want to ask you this question:
I have two tables:
one is sales table called {Posheader} and the second {Tax}.

the fileds are:

POSHEADER
---------
transact 1 |2 |3
Amount 1650 |1500 |3300
Tax1 150 |0 |300

TAX
---
Tax1 10 //10% value
Tax2 0
Tax3 0

the question is that i want to show in my report the sum of all taxes, taxable amount and non taxable amount
for transaction 1 tax=150 taxable=150*tax1=1500 and nontaxable=amount-taxable-tax=1650-1500-150=0

But the problem is that there is no link between the 2 tables. (the table of tax can be maximum one record)

Any suggestions?
very urgent!
 
Your example shows that you have something called Transact in the POSHEADER which joins to Tax in the Tax table.

And your example shows 3 rows for tax yet your text states "(the table of tax can be maximum one record)".

I'll assume that this is a language barrier and that you mean that you would only use one row from the tax table per row in the POSHEADER (called a one-to-one relationship).

So join as stated above, and build your formulas, seems doable.

-k
 
Man!
I just want you to know that there's no link at all between the tables.
all my report stands on the posheader table only, but i need Tax1 from the second table "TAX" to use it in my report as a formula.

any way?
 
Kill the dba.

Place the Tax table in a subreport in the Report Header and create a formula to pass the value, asi in:

whileprintingrecords;
shared numbervar MyTaxID := {table.taxid};

Any section after the subreport has been run the value will be available for use in the main report using:

whileprintingrecords;
shared numbervar MyTaxID;
MyTaxID

You can shrink the subreport so as not to show it in the main.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top