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

Query+report question.

Status
Not open for further replies.

jasemckee

Technical User
Sep 25, 2002
7
NL
Hello all,

I have created a report for a library of books.
I have also created a query which gives the total number of books in the library ie. 2307.

My question is how do I insert the total number of books query into the books report so that on the report it shows the total number of books and this number being updated automatically everytime a new book is added.

Thanks in advance.

Jase.
 
Hi

The easiest way to achieve this is probably to dump your query which counts the books, in the query which is used to produce the list of books add an additional column so x:=1

on your report, on each detail line put a textbox control with source x, set this control to visible=false, in you totals section put a control with source =sum(x)

Regards


Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
UK
kenneth.reaySPAMNOT@talk21.com
remove SPAMNOT to use
 
On your report design, to get the total you can one of two things depending upon how comfortable you are doing it!!

One way is create a text box and insert the following text:

=Count([thefieldname])

Then put this below the page footer. (This area may be greyed out but you can still drop it in below it).

Or you can copy the field that you want the total to be based on and then insert the above details around it.

If you have groups on your report, by placing the above in the group header, it will give you a total for that group, you can still add the grand total at the end.

Hope this helps!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top