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

Supress groups based on subreport in a group

Status
Not open for further replies.

JRBeltman

IS-IT--Management
Feb 5, 2004
290
NL
HI all,
as per usual a supression problem.

I have a report consisting out of 3 groups and the third has a subreport in it so the subreport is evaluted only for that grouped selection (grp = group, H = header, F = footer):

Grp H1 - Exam Centre (empty)
Grp H2 - Exam Module (field to reset counters to 0)
Grp H3 - Student Number (empty)
Detail (empty)
Grp F3 - Student Number (Subreport for calculations)
Grp F2 - Exam Module (empty)
Grp F1 - Exam Centre (Totals per Exam Centre for findings in Grp F3)

Now the only thing I wish to display is Grp F1 and hide the rest. But when I try to hide or suppress (using format section...) Grp F3 the subreport no longer passes its shared variables to the main report.

How can I suppress or hide the Grp F3 without loosing this information?

Regards
JR

 
Unfortunately, I think the best you can do is to not suppress Grp F3, and make the height of the subreport as small as you can (make sure 'Can Grow' for the subreport isn't checked).

-dave
 
I'm going to assume that the criteria for suppressing the subreport is if something in one of the headers is null or something.

Armed with this assumption, I would hope that you've already tried a conditional suppression of GrpF3 with something along the lines of
Code:
IsNull({Student.Number})
This should work in theory. But if what you're saying is that you're encountering the problem despite having already tried this, try applying the conditional suppression to the objects in the subreport and the underlaying following section options, rather than actually trying to supress the subreport itself.

If this doesn't help, provide some information about how you're currently trying to suppress or hide the subreport.

Naith
 
Hi all,
many thanks for your replies.
The problem is that the subreport always produces results, but I just wish them to be invisible and not printed out.

The results produced by the subreport (all shared variables) are use to calculate the figures in Grp F1

I have tried the normal suppress and hide on the Grp F3, but that seems to stop the shared variables to be passed on to the main report.

I have also made Grp F3 as small as possible and use the underlay following sections, but I got a feeling that the underlaying does not fully work because I have a couple of small sections showing up between each row of information from Grp F1(seemingly blank cause of the suppression of all sections in the subreport itself).

Hope this helps?

Thanks
JR
 
You need to have the GF3 section open for the shared variables to process, but if the group processes many times for each GF1 instance, you may find that even if you minimise the section as much as possible that you will get a combined stack of very narrow GF3s making for a slight space between each GF1.

Are you conditionally suppressing the other groups? Because if not, what isn't clear to me, and what will certainly be contributing to the sheer number of times GF3 processes - leading to the width of the gaps between GF1 - is why you need to group by Exam Module and Student Number when you say you are only actually displaying the data at the Exam Centre level. This approach seems to only give you the counter data for the last Exam Module what with the resetting of the counters in the Exam Module header. If G2 was removed altogether, I daresay you would address your stacked gap issue, unless you can reveal why you need the group.

Naith
 
Hi Naith,
I am not suppressing any other groups on condition, but blank groups (only used to get figures right) are suppressed in the section settings.

So I actually only have GF3 and GF1 showing.

I agree with you that it may well be worth rethinking the complete setup of the report, but due to a stupidly set up database things quickly go wrong and therefore I am forced in certain patterns of grouping.

However I was hoping for a magic fix I was unaware of to prevent the stacking and not printing the group in question (GF3)

I can also tell you that the underlaying of section (I just tested with some plain text) does not work for GF3.

Anyway I will try to play around with the grouping and see what can be done before coming back here to announce my victory (or defeat)

Cheers
JR
 
Hi All,
clever me! I now remember the problem.
1. I can not move the Module Group into the subreport because due to some specific necessary linking in the subreport (and a stupid database structure) module 5 would not show.
2. I can't do without the module group, because the subreport will be a mess. It needs the Module group to make sure that the student only shows up once in every module and that it calculates correct results for each student. The problem here is that a student can be in more Modules and the scores need to be calculated per module per student. And because of point 1 above I can not move the module group to the subreport :(
3. I think I am stuck! HELP!

Cheers
JR
 
Post a sample of your data, combined with an example of how you want that data to appear in your report.
 
Hi Naith,
I can actually rewrite the report due to the client dropping the requirement for 2 fields. Now I do not need to calculate these and can get rid of my subreport.

I will however see if I can put together some sample data, possibly in an access database for quick try outs.

But the database is very complecated, so it may well take me a while.

Many thanks for your help so far!

JR
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top