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

Report Queries and Scope

Status
Not open for further replies.

Vidar13

IS-IT--Management
Apr 4, 2001
90
US
Let's say I have a report that I want to limit to a specific item (so that I'm not printing an entire recordset), but I want the calculated fields to look at the entire recordset for their calculation.

The example is that I want to print a Sales Report for June of 2001, and I want to be able to use a running total to show the YTD for June at the bottom of the group footer. I would need to have access to the entire recordset, not just the ones I actually want to generate pages for. Is there anyway of doing this, easily?
 
Would a subreport work?

Joe Miller
joe.miller@flotech.net
 
use Dsum() as the ControlSource for the textbox with the totals, and adjust the Criteria to fit your needs.

PaulF
 
I'm not sure how the subreport would work, but I can see how the DSum might work. I would somehow have to change the criteria, dynamically to fit range of months I would need. I'll work it out and let you know.

Thanks!
 
Don' know if this would work, but another thought might be to toggle the visibliity of the fields on and off based on your criteria. That way the ones that met your criteria would be visable, but the other records would not be (they should still format and be in your running sum, they just wouldn't be visable.)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top