Suppress Detail?

TessB

Plays well with others
Local time
Today, 13:05
Joined
Jan 14, 2002
Messages
906
Hello boys and girls!

I have a simple yes/no question for someone out there who knows for sure....

I have a report that has scads of records in the detail section that sometimes, I will need to see, and other times, I just want the summary information in the footer. Is there any code that when necessary, I can just suppress the detail information in the report so that I just get a nice summary report?

Thanks much, and have a super day!
Tess
 
Copy the report, and delete the detail section from the 2nd one.

Does that get you the result you want? That's going to be the "simplest" way probably...otherwise you're talking about scads of code to disable a section based on a checkbox outside of the report, or something...
 
Yes it's not a big deal.

You can make an event sub for Report Open.

In the sub you can set the Visible property of the detail section to False. Then you will just see the group footings.

You will have to figure out how the sub "knows" you just want subtotals.

You can refer to a control in an open form where you can set a yes/no value for showing the detail.

RichM
 
Brilliant!

David,

I didn't want to start flooding my database with duplicates of reports unless absolutely necessary. I've honestly too many reports as it is to try and keep them all straight!!! And, actually, it seems it will take the same amount of coding whether I put a checkbox on my Report Menu indicating "Include Details" and tell it what report to open based on that, or whether or not to suppress the details of the requested report.

Rich,
That was exactly what I was looking for! Now, how do I refer to the detail section in code? Me!Detail.visible = false?


Many many thanks to both of you for your responses. I am always impressed by this forums willingness to help their peers.

Tess
 
If (I don't want to see detail) Then
Me.Section(acDetail).Visible = False
Else
Me.Section(acDetail).Visible = True
End If

Like that.

RichM
 
Fantastic. Thanks. Would have taken me a while to find the correct syntax.
 
RichM is wiser than I in reports.

What he said. :p
 
No worries!

No worries, David... you are still on my buddy list! I've taken plenty of your advice before and am grateful every time you take time to reply to one of my posts.
 
Awww, I feel all warm and fuzzy inside..

Like I just ate a kitten.:D
 
Must.... resist....temptation.....

Now, if we were in a pub, I would have a great comeback for that... but since this is a family show....
 
Heh..

Say no more, say no more...know what I mean?

Wink wink, nudge nudge.. :rolleyes:
 
Bwahahahah!

Dear me! I laughed so hard I almost choked on my lunch! (Lobster thermidor aux crevettes with a mornay sauce garnished with truffle pâté, brandy and a fried egg on top and Spam.... quite tasty really, if you like Spam...)
 
If I was having that for lunch, I'd choke too...

Yeesh.

Trying to get all the food groups in your mouth at once?

(see above comment on family atmosphere)
 
OK, I have a report that has tasks and subtasks. When I set up the report with subreports, then if there are no subtasks, the detail section on the report still shows up. I can use the code listed earlier in this thread:

If (I don't want to see detail) Then
Me.Section(acDetail).Visible = False
Else
Me.Section(acDetail).Visible = True
End If

However, I do not know how to set the "if" part. What I would like to do is say that if the task_ID is null, or the value of task_ID is false, then me.section(acDetail).Visible = False.... But I do not know how to reference the task_id.

Sonja
 
How about..

If IsNull([Task_ID]) Then
 
Thanks for the answer David R. That sort of worked, however - maybe I need to outline a little better:
I have one Fundamental Strategy that has many Tactical Objectives, and each Tactical Objective can have many tasks.
Now, if I use the code you gave me, both the Group Header1 and the detail dissappear - in other words, the Tactical Objective only shows up when it has a task?!
Sonja
 
Back up a bit...

Do you want to only show the Tactical Objectives when there are associated subtasks, or is that what's happening now and what you wanted was something else entirely?

I confess Reports aren't my strong suit, but if you can give a little more information about what you're trying to achieve, myself or someone else can help you.
 
You wrote
<<
in other words, the Tactical Objective only shows up when it has a task?!
Sonja
>>

That's true.

If you want to see something for an Objective (what ?) put it in a Footer, not a Header.

RichM
 
There will always be a Fundamental Objective, there are one to many tactical objectives for the fundamental objective and there are one to many task for each tactical objective. What I want to do is show the Fundamental Objectives, show the tactical objectices below AND if there are any tasks for that tactical objective, I want to show those tasks - however, when there are no tasks, I do not want to show the space or the labels that would normally show for a task.
Does that make sense?
 
Yes.

Earlier you wrote
<<
I have one Fundamental Strategy that has many Tactical Objectives, and each Tactical Objective can have many tasks.
>>

Sounds like one Strategy can go in a title.

You want to see something for all Objectives.
If there are Tasks you want to see them too.

So the next trick is: a subreport for Tasks !

The main report will list all the Objectives in the Detail section (no Heading needed). The subreport, also in the detail section, will show Tasks (if any) for the Objective.

RichM
 

Users who are viewing this thread

Back
Top Bottom