×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Check if section is suppressed?

Check if section is suppressed?

Check if section is suppressed?

(OP)
Is there a method to check if a section in the report is suppressed? I have multiple subreports in multiple report sections and want to display a specific footer image (in page footer) depending on what section is displayed.

RE: Check if section is suppressed?

The only way I know is to check the same criteria that is being used to suppress the section.

RE: Check if section is suppressed?

(OP)
That was my fear that was the case.

RE: Check if section is suppressed?

If a subreport is directly suppressed or if the section it is in is suppressed, the sub will not be able to pass a shared variable. So you could set up a shared variable in a subreport then make the page footer note appear only when the shared variable passes to it.

-LB

RE: Check if section is suppressed?

(OP)
lbass, I'll give that a try and see what happens.

RE: Check if section is suppressed?

(OP)
Ok that's not going to work with what my vision is.

It works for getting the page footer note to appear but it's appearing on every page but I only need it on Page A.

Example is:

Report Footer A - Subreport 1
Report Footer B - Subreport 2
Report Footer C - Subreport 3
Report Footer D - Subreport 4

Note 1: Report Footer A
Note 2: Report Footer B-D

Unless there is a trick to make the report footer in the Subreport always at the bottom and not dynamically flow with the content of the page.

RE: Check if section is suppressed?

Not quite clear on the issue. Is the subreport1 a multi-page report and you want a note at the bottom of each page? Let me know if this is the issue.

If you only need the note at the end of the aub, you could add a RF_b section for a faux page footer and then format the section to print at the bottom of the page, and then format it to new page after.

-LB

RE: Check if section is suppressed?

(OP)
No the sub isn't a multipage subreport. I'm using suppression and using the shared value I get back to suppress or not.

Also I had a type in that Note 1 and 2 are in the "Page Footer" not report footer.

Problem I'm running into is that Note 1 is showing on subsequent pages since its suppression is set to true. I can't use "PageNumber" since the user can display any of the 4 pages they want.

RE: Check if section is suppressed?

You can create sets of formulas in the main report like the following, one set for each page footer section, identifying the flags for different subs with different letters:

{@trueA}:
Whileprintingrecords;
Booleanvar flagA := true;

{@falseA}:
Whileprintingrecords;
Booleanvar flagA := false;

Place {@falseA} (along with all other false formulas) in main report report header AND place {@falseA} in page footer_b. Place {@trueA} in pf_a where subreport A resides, and then format pf_a in the section expert to suppress with this formula:

Whileprintingrecords;
Booleanvar flagA;
FlagA = false //note no colon

Repeat for other page footer flags, putting the true formulas only in the section where the corresponding subreport resides. If you need to also use a shared variable because of conditional subreport suppression, then the suppression formula should read something like this:

Whileprintingrecords;
Booleanvar flagA;
Shared booleanvar suppresssubA;
SuppresssubA = false or
FlagA = false

-LB

RE: Check if section is suppressed?

(OP)
Amazing logic lbass. That seemed to do the trick.

RE: Check if section is suppressed?

(OP)
I tried to place the suppression on the image and not the page footer section and it isn't working since one image keeps on showing on the wrong pages.

RE: Check if section is suppressed?

The suppression formula should be on the section containing the image, not the image itself.

-LB

RE: Check if section is suppressed?

(OP)
Can it not be applied on the image?

RE: Check if section is suppressed?

Please show the formula you are using to suppress the image.

Also, is it that you want the image to behave differently than the note in the page footer section? If so, in what way specifically?

-LB

RE: Check if section is suppressed?

(OP)
Here's the suppression formula for the image.

Whileprintingrecords;
Booleanvar flagE;
flagE = False//note no colon

I used what you stated to use for the Page Footer on the image. I have the false formula in the Report Header and in the Page footer B which is after Page Footer A where the image is located.

The goal is that there is a different image for each sub report, so depending on which sub report in the Report Footer is displayed I need to display x image.

RE: Check if section is suppressed?

And {@trueE} is in PF_a?

I'm confused by your designation of the flag as FlagE--I was assuming you would designate the page footer flags with the letter that corresponds to the RF section the sub is in, e.g., flagA for RH_a and PH_a, etc.

You still haven't explained why you are not just using the suppression formula on the section in which the image is located.

-LB

RE: Check if section is suppressed?

(OP)
Well i've restructured and have RF_a - F but I'm only using 1 Page Footer since using multiples seems to throw off my page formatting in the subreport.

I have:
RF_B
RF_C
RF_D
RF_E
RF_F

3 Images are located in PF_A.

Image 1: needs to display with RF_B, C & D
Image 2: RF_E
Image 3: RF_F

I've placed all the false formulas in the "Report Header" and placed the corresponding true formula's in the sections of the subreports.

RE: Check if section is suppressed?

You need separate page footers with the suppression formulas in the section expert, whether you are working with notes or images. The page footer should not be disrupting the display of the subreports if you are suppressing correctly. Note that the {@false formula should also appear in the section following the one containing the true formula, like this:

RH - {@falseA} {@falseB} {@falseC} {@falseD} //etc.
RF_a: subA {@trueA}
RF_b: subB {@falseA} {@trueB}
RF_c: subC {@falseB} {@trueC}
$F_d: subD. (@falseC} {@trueD}

The suppression formulas should be on the Pf sections in the section expert, not on the objects themselves.

-LB

RE: Check if section is suppressed?

(OP)
So do I need a page footer for each report footer section or for each image? Example 5 page footer or 3 page footers?

RE: Check if section is suppressed?

I can't follow this anymore. Why are there 6 RFs if there are only 5 subreports? Is RFa used for something else? Are there still notes? Or only images? Please identify where all the subs are. Name the page footers to correspond with the subs they should appear with and then identify which subs also need images in the page footer.

If the image for a sub only appears when a corresponding note appears, they can be in the same Ph section. You can format objects in the section expert so that they don't overlap.

-LB

RE: Check if section is suppressed?

I meant Pf.

-LB

RE: Check if section is suppressed?

(OP)
Sorry for the confusion. Just trying to process the vision I’m trying to get working. :)

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close