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

hide added detail section without hiding details 2

Status
Not open for further replies.

bv0719

MIS
Dec 19, 2002
131
US
Is it possible to hide a details section that has been added without hiding the orignal details section that you want to use. The reason I ask is I need to add a subreport and want to hide the subreport but do not want to hide the other info. I planned to put the subreport into an added details section. Is there a better place to put this report without it showing up or affecting the current report design? All I need is a variable from the subreport to place in the report but not the subreport itself. Any thoughts?
 
You could put it in the new detail section and select the "underlay follow sections" option under the section expert. This will give the appearance of one detail section when previewing the report. If you don't want to see the subreport, just suppress all section in the subreport.

Noxum
 
You're going to fire the subreport for every row in the main report? That will definitely be a performance hit.

Remember that if you're passing data from the subreport it will have to run first, so place it in details A, right click the Details A and select format section->and select Suppress.

-k
 
PLEASE DESCRIBE YOUR REQUIREMENT BETTER!!

The placement of the Subreport is critical and governed by many issues but none of these can be discussed until we know what you are trying to do.

1. Is the returned value from the subreport linked to a field in the Detail section? If it isn't then the subreport doesn't belong here. As SV points out, you will be firing the subreport repeatedly for no reason.

2. A subreport returned value must be determined in the section BEFORE the shared variable is used...you cannot have them in the same section.

3. If a subreport is not to be displayed but you want the shared value...just place it in a section before it is needed, suppress all the sections of the subreport, make it as small as possible, remove its field borders in the main report and it disappears.

There must be 100 posts in the archieve describing how to suppress a subreport.

Jim Broadbent
 
I need an amount to be calculated by a subreport and have that amount display as a field in the details section of a report I have already created. I do not want to see the subreport when the report prints. I plan to use a "shared" function to use the amount from the subreport in the detail section of the actual report.
Where is the best place to place the subreport? I presently have it in a details B section. Any thoughts would be helpful.
 
Place it in the A section. The subreport must process before you can access the variables from the main report.
 
noxum.. If I place it in the A section should I then move the items that are currently in A to the B section then suppress A so it does not print?
 
Swap Details A and B.
In A will be the Subreport.
In B will be the Main report's details.
You can't suppress Details A in the Main report, as the Subreport will then not run.
You'll have to suppress all sections in the Subreport, and then format Details A in the Main report to Underlay.

Bob Suruncle
 
Thank you all for the help. I'm getting the report much closer to where I need to be. Here's hopefully the last question. I have a formula for a shared variable in the sub report as follows:

Shared numberVar intX;
intX:= Sum ({@NET}, {@CONVERT})

I then enter this shared variable into the details section of my report as follows:

Shared numberVar intX;
intX

The total that ends up in the main report is the grand total of the @net amount instead of a summary of the @net amount. I need the summary to be grouped by @convert since the last 4 digits of my GL numbers denote the department. I tried to change the formaula but received error messages.

Shared numberVar intX;
intX:= Sum ({@NET},GroupName ({@CONVERT})

Any thoughts. Most Appreciated!!!
 
Have you tested to see if your getting the correct summaries in the subreport by itself? You could try creating the {convert} group in your subreport, getting the sum total and then passing that total.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top