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

How to set size of subreport? 1

Status
Not open for further replies.

alexbelovtt

Programmer
Nov 15, 2005
51
US
I use Crystal 11 and visual basic.
Some of subreports have more than one page.
One of detail section set to Keep Together to keep pair of two Detail sections together, without page brake between sections.
Some time if second section is small – it just hidden, looks like by main report (container for subreports.)
I try to Open subreport and set Top and Bottom margins, but it dos not help.
Looks like paper size or page size of subreport is bigger that I need.
 
Try editing the subreport from the main report. You can put a box round it, which should make it distinct.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
I did test box around subrepor , still printing over the box….
Is that any way to limit height of subreport?
 
I don't think so. You could do a line count on the page, and start a new page when it would otherwise look bad. Line counting is done as follows:

In the page header, clear away values from the previous page:
WhilePrintingRecords;
NumberVar LineCount :=0;
Inlcude a 'line count' in each header and detail section; make your own estimate of how many lines that section it is equivalent to
WhilePrintingRecords;
NumberVar LineCount := LineCount + 2;
Check the value of the variable in a Formula field, {@Lines_Done}
WhilePrintingRecords;
NumberVar LineCount;
Check for the Page Before option, so as to move to a new page when there will not be enough room. E.g.
{@Lines_Done} > 50

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Thank you, Madawc.
It’s works.
Only bad thing is I must update with those formulas 96 reports …
 
I think you should explore more what might be going wrong. Make sure you don't have the first section set to "underlay following section" in the section expert. For the second subreport, you also might try going to format->subreport->common->uncheck "Keep object together". You might want to uncheck "Keep together" in the section expert for the individual detail sections, but put "Keep together" on the higher order detail section.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top