display some results

slimjen1

Registered User.
Local time
Today, 11:34
Joined
Jun 13, 2006
Messages
562
I posted in the reports forum. Maybe I'm asking in the wrong forum. Can anyone show how to display only the first few records in a subreport but keep the grand total of the report itself. When I limit results in query; it gives me the records but only totals for that set. I thought about putting code in the on format in detail section like:
Code:
If me.control.value >10 then
me.control.visible =false
but doesn't work. Help please
 
To do tis you would need to separate the subreport query from the report totals as they are no longer related. So, you would use two queries - one to give you the totals and one to produce the limited record set.
 
Or you can use an unbound control (a text box) and calculate the sum you need:
= DSum (......)
 
Of course mihail is right, but understand that this database lookup functions come with a degree of overhead. So, on your report you could have 6 fields. If each one has a dsum the this will be 6 separate SQL queries. Much better to do the query in one statement if you can.
 
Thank you for replying. Will try your suggestions.
 

Users who are viewing this thread

Back
Top Bottom