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


Suppress subreport based on a number not being in a range parameter

Suppress subreport based on a number not being in a range parameter

Suppress subreport based on a number not being in a range parameter

I built a report that contains 30 subreports designed to make multiple mail labels for a single record. (laid out in a 3 x 10 Avery 5160 format) I have been able to use a single number parameter and conditional suppression formula for each subreport to make it so I can print a specific number of labels. If I want to print 10 I can enter 20 in my parameter and it omits that number of the labels. I want to use the same type of method to specifically tell the report which labels that the report produces. So if I enter 7 - 10 in my parameter range, subreports 1-6 and 11-30 would be suppressed. This would be beneficial to allow for easier use of all the labels on a sheet. If I print 6 of one record and then can flip the sheet over and print 6 of another, I have 18 labels left in the middle of the sheet that are pretty useless unless I try to move them to the top of the page. The logic in the suppression formula for the 3rd label subreport position would be like "Not 3 in {?rangeparameter}". When I try this I get a boolean is required here. I also tried "3 < minimum({?rangeparameter}) or 3 > maximum({?rangeparameter})". This one just does not return any results which baffles me. This logic basically would be if I selected 5 - 7, 3 would less than my minimum and therefore suppress the subreport. If I selected 1 - 2, 3 would be greater than the maximum and therefore suppress the subreport. If I select 2-4 then neither less than or greater to apply and it should not suppress the subreport. I cannot understand why this one did not work. Any ideas? Thank you in advance.


RE: Suppress subreport based on a number not being in a range parameter

Just do it by row. You can have parameters for ?StartRow and ?StopRow then just put a suppression formula in each Detail band.

RE: Suppress subreport based on a number not being in a range parameter

Thanks for the reply and suggestion but putting the suppression in the detail would suppress the row and the row that is not suppressed would move to the top of a printed page eliminating what I am attempting to accomplish. The 15th label is the first label in the 6th row. If I suppress the first 5 rows then the 6th row becomes the 1st when printed. What I want to do is be able to select 15 to 15 in my parameter and all the subreports but the 15th would suppress but the detail sections of the main report would not suppress so the subreport would still maintain its position on the page and print on the 15th label on the sheet. I will probably never need a full page of labels for one record. If I print 6 labels, I am left with a page of labels that still has 24 labels on it starting at the 7th label. I want to be able to maximize the labels per sheet that I can use by selecting where they should start printing. In this example if I have a need for 4 labels for the next instance I can put in this sheet with 6 already removed and put in the parameter to print 7 - 11 and it starts printing at the 7th label position to the 11th.

RE: Suppress subreport based on a number not being in a range parameter

Okay, a little more tricky but still the same principal: You can apply that same suppression to all of the fields in that band. That way it will still take up the space, but will not print for the ones you don't want.

RE: Suppress subreport based on a number not being in a range parameter

I had to share that my logic for suppressing the subreports did work. There was another parameter for the patient selection that was not working properly. Once I corrected it the suppression formula: "3 < minimum({?rangeparameter}) or 3 > maximum({?rangeparameter})" for the 3rd label position subreport worked perfectly. I can now select a range such as 10 to 15 and just those subreports will generate on the page and in the proper positions to print on the 10th to 15th labels on an Avery 5160 sheet. This allows you to maximize the labels you print per sheet. Thanks to everyone that gave their suggestions. Bob

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!

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