Trying to suppress section based off of a subreport

Hello,

I have been working on a report and i am stumped at the moment.  The report is a report for purchasing and each page is an overview of a part number that they would need to go buy for.  If the inventory level is above 0 for all requirements on the books I want to suppress these pages and only show the pages that the purchasing team needs to go and buy.

I have to rely on a sub-report and shared variables to do the suppression because I have to use summaries to get the data so using the selection expert is out of the question.  I have attached the report definition file for your reference.  

The sections in the report I am utilizing are below.  If something isn't included it is suppressed.

Page Header A, Page Header B, Group #1 (Headers 1a-1b, Footers 1a-1e), and the Report Footer.

The sub-report is located in Page Header A and only one shared variable is being passed to the main report from this sub-report.  I have put the formula for the shared variable in Page Header B and it is returning the correct info.  Next, I have used the section expert to suppress all the sections in Group #1 (Header 1a, 1b, Footer 1a, 1b, 1c, 1d, 1e)  based on the shared variable.  

Basically, I can suppress all of the sections in Group 1 except for 1a.  If I put the suppression formula in 1a I get a 1 page report when it should be hundreds of pages.  In lieu of a fix I have been suppressing the individual fields in Group Header 1a with the same suppression formula successfully.  However, when I go to print/export/etc I get a blank pages (the pages I want gone) in between full pages (the pages I want).  If I also tick the check box for suppress a blank section for Group Header 1a I get a 1 page report again.

Any help would be much appreciated, thanks!!
feizyAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mlmccCommented:
I don't see the attached file

mlmcc
0
feizyAuthor Commented:
I may have forgotten to hit the upload button, sorry.  Here it is.
LTZ4.txt
0
mlmccCommented:
Can you upload the RPT file?

mlmcc
0
Angular Fundamentals

Learn the fundamentals of Angular 2, a JavaScript framework for developing dynamic single page applications.

feizyAuthor Commented:
Sure, here it is.
LTZ4.rpt
0
mlmccCommented:
When do you want the sections suppressed?

mlmcc
0
feizyAuthor Commented:
The sections need to be suppressed when the shared variable from sub-report Test2 (formula LTZ in the main report) are great than -1.

I have the suppression formula in all sections but Group Header 1A as when the formula is there it causes a blank report, basically.

if {@LTZ} > -1 then TRUE else false

Open in new window

0
mlmccCommented:
Are you getting some negative values for LTZ?

mlmcc
0
feizyAuthor Commented:
Yes, I am getting negative values.  Here is a sample of the output of the report to give you a better visual of what is going on.
LTZ4.pdf
0
mlmccCommented:
In that sample, what do you want to see?
Just the last page?

mlmcc
0
feizyAuthor Commented:
Yes, just the last page.
0
feizyAuthor Commented:
Have you had any luck?  Thank you.
0
James0628Commented:
I don't know if you're still looking for help with this, but FWIW ...

 You said that you'd checked the value in the shared variable in Page Header b and it was correct there, but did you try checking it in GH1a?  I have the impression that certain things, like page headers and group headers at the top of the page, may not be processed in the obvious order.  I would check the value of the variable in GH1a, just to make sure that it's correct.

 If it is correct, I'm not sure what to tell you.

 If it is not correct, maybe you could create a new GH1 section, put it above the current ones, and move the subreport from the page header to the new GH1 section.  If the subreport doesn't produce any output, and you set the "Suppress blank subreport" option in the subreport format, and set "Suppress blank section" for the section, then the new GH1 section (with the subreport) should be suppressed.

 I really don't know if that will work, but you could give it a try.

 James
0
feizyAuthor Commented:
Thanks, I'll check it out today, would I check that by doing a export of the report definition file?
0
mlmccCommented:
You don't have any suppression formula for GH1A

mlmcc
0
feizyAuthor Commented:
That is correct.  When I put in the supression formula in GH1A I only get a blank 1 page report when it should be much much more then that.
0
mlmccCommented:
That is because the subreport is in the page header.

Try this

Insert a new GROUP 1 header section and move it up to be GH1A.
Put the subreport in GH1A with no suppression except suppress blank section
You can then suppress GH1B and GH1C

mlmcc
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
James0628Commented:
> ... would I check that by doing a export of the report definition file?

 Check what?  The value in the variable?

 No, exporting to a report definition file will just show you the contents of some formulas (and it never seemed very complete to me).  It will not show you the results from those formulas, much less the values in variables.

 I thought you'd checked the variable, or formula, before, when you said that you'd checked it in PHb in your first post.  IAC, without d/l'ing your report again to check your formulas, etc., I would either:
 Put a copy of your formula that uses the variable in Group header 1a and see if the formula produces the expected result in that section.
  -- or --
 Create a new formula that just has the variable declaration in it and put that in Group header 1a, and see if that produces the expected value for the variable.

 James
0
feizyAuthor Commented:
That was it!  I also had the subreport suppress its value if it was not desired, then formatted the subreport in the main report to suppress if it was blank.  Then, I suppressed the new GH1A if it was blank.

Thank you everyone for the input and help.
0
mlmccCommented:
I don't know why we didn't see that in the first place.

mlmcc
0
James0628Commented:
FWIW, I suggested that same option in my post last week.

 James
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
DB Reporting Tools

From novice to tech pro — start learning today.