Toughie?

jdjewell

Registered User.
Local time
Today, 15:02
Joined
Jan 14, 2003
Messages
63
[RESOLVED] Toughie?

I have a report, which shows the following Projects and Tasks from my company's time reporting system. There is a grouping on each TaskID within a grouping on each ProjectID.

Here is the problem, some of the tasks have several workers logging hours against that task (which is expected). The problem, is that I HAVE TO suppress duplicates. In order to do that, the name field and the hours field have to have properties set as follows:

can shrink - yes
hide duplicates - yes

This enables me to set the Detail line's "can shrink" property to 'yes' and everything works fine, with one exception...

John 8
Todd 4
Lisa 4
Jennifer 4
Eric 7

Should appear as I have it above. Instead, it appears like:

John 8
Todd 4
Lisa
Jennifer
Eric 7

So, the question is, how do I evaluate (in the onFormat I presume) whether the current name is the same as the previous name? If it is the same, then I want to hide the hours, if it isn't, I want to show the hours.

Hope it's all clear as mud now.
 
Last edited:
I guess there must be more to it than this ...but...
Why not just remove the hide duplicates from the hours field (only)?..

I've just read the end of your post again, could you ahieve your aims by grouping the names? and hiding duplicates on the hours perhaps?
 
Use a subreport and link it to the name.
 
I guess there must be more to it than this ...but...
Why not just remove the hide duplicates from the hours field (only)?..

I've just read the end of your post again, could you ahieve your aims by grouping the names? and hiding duplicates on the hours perhaps?

1. Order has to be on hours, not name -- project requirement. Plus, that still wouldn't alleviate the problem of having the hours for the second person disappear, i.e.:

Anderson 2
Butler 3
Curtis 1
Ericson
Harris 4
Use a subreport and link it to the name.
I thought this had promise, but it didn't work out at all. First, when I changed to a subreport and linked of the appropriate fields, the report began to prompt me? Which was absolutely retarded, given the fact that I could run all of the queries being used without getting prompted and I could run the subreport by itself without getting prompted.

Second, this wouldn't work, because I am using pass-through queries to increase the speed/efficiency of this report and Access will not let you use a pass-through query for a subreport.

So, again, if you guys can think of a way for me to set a global variable and check the current value to see if it is the same or not i.e.:
Code:
(global)variable set to the name

if it's the same then 
     hide duplicates = true  ' duplicates...meaning hours
else 
     hide duplicates = false
end if

Hope the pseudocode is understandable.
 

Users who are viewing this thread

Back
Top Bottom