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

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

Status
Not open for further replies.

Bob L

Technical User
Apr 21, 2017
6
US
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.

Bob
 
Just do it by row. You can have parameters for ?StartRow and ?StopRow then just put a suppression formula in each Detail band.
 
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.
 
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.
 
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top