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!

Subreport suppression on main report

Status
Not open for further replies.

DougNaf

Programmer
Jun 2, 2005
32
US
I am using CR 9. I have a main program that calls 3 subreports. Each of the subreports send a unique key (trip #) and returns a $.$$ amount. On the main program I have the 3 subreports on a Group Footer #1a line. Under that (Group Footer #1b) I am displaying the amounts plus some other data. Is there a way to suppress the Group Footer #1a line so the report does not appear to double space? I have tried to 'suppress' the #1a line, but then nothing prints on the #1b lines. I have the #1a line as small as possible on the grid.

My second question deals with grand totals from the #1b line. I have a supress on #1b if one of the amounts from the subreport is < 100. When i add a grand total it is adding all amounts from the #1b line and not just those that are >= 100. How can i just total up (grand total) the amounts >= 100?

Thanks in advance for help!
Doug
 
If you are using shared variables in GH1b, then you can suppress all sections WITHIN the subreports in GH1a, remove the borders from the subs, and format each subreport->subreport tab->"suppress blank subreport". Then in the main report section expert->GH1a->check "suppress blank section". What you CANNOT do is suppress the subreport object or hide or suppress the section it is in.

Regarding the grand totals, do you mean a total of all the subreport amounts in the same group section? Or do you mean a grand total at the end of the container report? If the latter, then you must be using a variable to collect the shared amounts. You need to add a condition to the formula you are using to accumulate the grand total like this:

whileprintingrecords;
shared numbervar subamt;
numbervar grtot;
if subamt >= 100 then
grtot := grtot + subamt;

-LB
 
Thanks for your information. I tried the 'suppress blank section' that you suggested but it did not appear to work. You mention "What you CANNOT do is suppress the subreport object or hide or suppress the section it is in". I think that is what i am really trying/needing to do. The only thing I have on the #1a group line is the 3 subreports and that is why i want to suppress the group line (and not make the report look like it is double spaced). I will keep working at trying other things.

The grand totals I need are at the end of the container report so i will try the the formula. A dumb question - do I put the formula as part of the group header #1b snce that is where I am printing the 3 subreport results?

Thanks!
Doug
 
If you followed the steps I mentioned for each subreport, the entire section GH1a would not appear. There cannot be anything else in the section (or other items must be suppressed)--so please explain the specific steps you took.

Yes to your second question. Then add a formula like this to the report footer to display the results:

whileprintingrecords;
numbervar grtot;

-LB
 
On the main report I checked the format and made sure each fo the 3 sub reports had the line style left, right, top, and bottom at none.

On each subreport I went to the section expert and for Report Header A, B, details and Report Footer,I put a check mark in the "suppress blank section" option. Is that what you meant by "each subreport->subreport->"suppress blank section"? In the main report I did section expert->GH1a-> check "suppress blank section"?

Thanks again for your help!
Doug
 
Yes, you removed the borders correctly and formatted the container report correctly, but you still must do the following:

1-Please select each subreport->format subreport->subreport tab->"suppress blank subreport".

2-Open each subreport->section expert and SUPPRESS each section WITHIN the subreport (You just can't suppress the subreport itself).

-LB
 
Thank you for reviewing the 'suppress' steps. I went back thru the steps and this time everything worked!

The formulas you suggested for the grand totals worked also.

Thanks again for your help!!!

Doug
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top