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!

Adding two different totals from one entry at the end of a report 1

Status
Not open for further replies.

lostris

Technical User
Oct 9, 2002
6
US
Ok.. I REALLY hope someone can help me with this - its just one of the last two things I have to figure out before this cursed thing is done.. First off, just so you know how its all set up, I have seven different queries doing seven different pricing equations (couldnt figure out how to get one query to do it all ;)) which is all dumped into one huge union query.. Basically so that the report will put in one row whether it is an ES1 charge and ES2 charge (there's different pricing that goes on in each one.. like 4 different prices per percent of sediments.. its confusing) so in the report instead of having a blank spot where its an ES1 and not ES2 it just puts ES1 or ES2 and the pricing for that one.. well at the end of the report I need it to total the total cost of ES1 and the total of ES2 SEPERATELY. Right now its just totaling it all together. How do I get it to seperate? Do I have to make another query? I'm lost :( (also need to know how to set up a parameter query in a union query.. if you can help me with that one too I'd be thankful lol I need it to promt the user for dates before it runs the report..)
 
Lets see if this helps.

At the end of the line in the Detail section add an unbound text box control Called [ES1RunSum] and make it .visible = No ( you can make it as small as you like too. )

Set the RunningSum property to SumOverGroup

Set the ControlSource to:-
=Iif([txtESNo] = "ES1",[Price],0)

Then have anotherone called [ES2RunSum] and set the ControlSource set to :-
=Iif([txtESNo] = "ES2",[Price],0)

( Change [txtESNo] and [Price] to whatever field names you're using )

Then in the Group footer have a visible UNbound text box control that has the ControlSource :-
=ES1RunSum

and another with ContorlSource :-
=ES2RunSum
Place these two where ever you need them.



That should do what you need.
G LS
accessaceNOJUNK@valleyalley.co.uk
Remove the NOJUNK to use.

Please remember to give helpful posts the stars they deserve!
This makes the post more visible to others in need! :-D

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top