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

Is it possible to only print selected pages of a report?

Status
Not open for further replies.

fatbloke

Programmer
Sep 4, 2000
47
GB
I've looked at this from all ways and cannot find an answer. X-)

I have a summary report in CR6 which maintains a number of totals while reading the records and then outputs the summary in the report footer. The user only wants this last page which would be easily achieved by suppressing the detail section.

Good so far, but now we get to the nub of the problem!

The main DSN for the report is on Oracle, but other details reside on an AS/400 server. The only way that the two could be incorporated on the same report was to put the AS/400 detail into a subreport and to use StoreNumberVar/FetchNumberVar to get the value therein into the main report totals. Unfortunately the subreport is not recognised if it is suppressed leading to zero totals in the summary. Thus currently the report produces a number of empty pages before the summary which I would very much like to be rid of. Any ideas out there? [sig][/sig]
 
Here is a technique that seems kludgy, but works.

In the subreport, suppress all of the sections except for the report footer which does the store. Also in the subreport, suppress all of the fields on the report footer. Now one section of the subreport "prints", but nothing is visible.

Last, in the container report, format the section that contains the subreport so that it "underlay's" the following section. It now doesn't take up any space, and it is completely transparent. You may have to experiment with it a bit, but I have used this technique to solve the same problem.

You may have to split this invisible section so that you can ensure the fetch comes after the store each time.

[sig]<p>Ken Hamady<br><a href=mailto:ken@kenhamady.com>ken@kenhamady.com</a><br><a href= Reports Taining by Ken Hamady</a><br>[/sig]
 
Steven - the report is currently being produced in the report designer, but will ultimately be produced using the crystal report component called from a Delphi application. I hope that the calling application may be able to suppress the blank pages but am waiting for a Delphi resource to confirm that.

Ken - I recall trying something like that having seen it on the seagate website, but it didn't appear to work. I shall give your solution another try and report back.

Thanks guys in the meantime! [sig][/sig]
 
Ken - have tried getting this to work but still having problems.

I think the problem lies in the fact that to get the Store/Fetch to work I had to have two detail sections - details(a) is the subreport where the variable is stored, and details(b) fetches the variable and maintains running totals.

I can get details(a) to underlay details(b) but if details(b) is suppressed details(a) then reappears. I rather hoped that either (or both) of the detail sections would underlay the report footer but this is not the case.

Any further ideas would be greatly appreciated. [sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top