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

How to sort my Data in a Report 2

Status
Not open for further replies.

cblock1025

Technical User
Jan 31, 2004
31
US
Ok,
I have a table called transaction contains these fields:

TransactionDate, Amount, type = either S(Service) or P(Payment).

I wanto to sort these out like this in a report:

All my Services on one side and all Payments on the other side:


Date Type Amount Date type Amount
01/01/04 S $ P $

So all payments on one side of the report and all services on the other side. I was trying to do it with two queries and then unite them some how.

Christian, Thanks ahead of time

 
You have the right idea. Make a report. Then put a subreport for your payments query and one for your services query. When you are in design view you can resize these however you like. hope this helps.
Mark
 
You can create one subreport and place it twice in the same main report. Add two text boxes to the main report
Name: txtS
Control Source: ="S"

Name: txtP
Control Source: ="P"

Then set the Link Master/Child properties of the left subreport
Link Master: txtS
Link Child: Type
Set the Link Master/Child properties of the right subreport
Link Master: txtP
Link Child: Type


Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
Awesome!!!!!!!!!!!!!!!!!!!! Works Great. However, I am totaling the both sub reports which works fine, but I need these two totals to be added at the end of the main report.

= Report!ProgressReportPayment!Amount = Sum(Amount) + Report!ProgressReportService!Amount = Sum(Amount).

However, I can't seem to get the sum right in the criteria. Can you guys redo that expression, I would really appreaciate it.

Thanks
Christian
 
I would create the totals in the record source of the main report.


SELECT Sum(Abs(Type="S") * [Amount]) as Service,
Sum(Abs(Type="P") * [Amount]) as Payment
FROM Transaction;

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
Hey thanks so much!!!! It works great. I worked on it last night with all of you guys help.

Thanks
Christian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top