Filtering

William Smith

Registered User.
Local time
Yesterday, 22:38
Joined
Jul 23, 2007
Messages
18
I spent the last 3 days trying to get this to work. My final report is complete and I have 2 subreports that I only want to display the most recent record. It is displaying all the records. I've tried SELECT TOP 1, I've tried sorting with a query (DESC). I sure would apprecitate any help.
 
you haven't really described your problem. what is happening when you try select top 1 and what happens when you try DESC.

what are the data sources of the subreports?

are the subreports linked to the main report, or are they just embedded?
 
My database is about satellites. The main form you select your satellite and now all the subforms (that are drawing from some 30 tables) only pull the info for that satellite (I created relationships). The "Summary Report" I am trying to create begins with a "view reports" on the main form (this is exactly like the access templates you find) a form pops up in which you select the report. It all works and follows the satellite you chose on the main form. The two sub-reports are from a query that I sort in DESC by date the record was entered to its table. Everything works except it shows all the records that for the subreport. I've read everything about top values, etc. Isn't there a filter I can input on the subreports "property view" to only select one record? I'm sorry if this isn't worded well. But I really have spent a great deal of time on this.
 
If you only want to display the latest record in the subreport, change the underlying query of the sub report to a grouping query and for the Group By part (for the date field) select MAX.
 

Users who are viewing this thread

Back
Top Bottom