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

Subreport page footers

Status
Not open for further replies.

neeko1226

MIS
Jul 24, 2003
82
US
I'm using crystal XI and trying to insert some reports as subreports to a main report that links to them by state. I have gotten as far as creating fake page headers in the subreports using a "" grouping, and that works just fine. My issue is in creating the fake page footers.

Does anyone know of a way around the said limitations of fake page footers (ie no detail records can be set to "can grow" and must specify number of records per page)?

The reports I'm creating must mirror some reports created by another company so column width is not negotiable. My first column has data that sometimes needs to wrap to a second line. As for the number of records limitation, some states will have one or two records and others will have up to 30. I need a new page after each state so setting the number of records to always be ten will kill me.

Any help would be greatly appreciated.
 
I don't follow. Group headers can dummy as page headers in subreports. Group footers as page footers. And 'Section Expert' includes the option to print at the bottom of the page.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Can you explain what you want in the page footers? Is it specific to a page? Could you use the main report page footers?

-LB
 
Madawc - If I insert the subreport's page footer into the group footer of the group I'm using for the page header (@FakePageHdr), and the number of records is such that there needs to be a second page for that report, then the page footer only displays on the second page (at the end of that group). See below for the details.

lbass - The page footer contains formula fields that are "report footnotes" with info regarding the calculations in the report. For this project, they must be displayed at the bottom of every page for each of the subreports.

Here's how I have the sections of the subreports set up now and the info they contain:

Report Header - Suppressed
Page Header - Suppressed
Group1 Header (state) - Suppressed
Group2 Header (@FakePageHdr) - Page/column Headings
Group3 Header (area_scope) - sorts areas within state by importance
Detail
Group3 Footer - Suppressed
Group2 Footer (@FakePageHdr) - report footnotes [set to print at the bottom of the page]
Group1 Footer (state) - suppressed summary formulas used in report calculations [set for new page before]
Report Footer - Suppressed
Page Footer - Suppressed

On a seperate note, I also noticed that the sorting from the subreport is lost on the main report. Is there a way to prevent this?

 
You is a way to use the linecount solution. What does the column that wraps look like? Can you provide samples?

-LB
 
The column that wraps is the area names with in each state. They are defined by the government and are pretty lengthy. An example is "SACRAMENTO_ARDEN_ARCADE_ROSEVILLE_CA".

I neglected to mention that I'm also required to use Universal Condensed Font Face and it has to be 9.5 Font Size. The column width has to be one and five eighths.

I could email you the .rpt file if you'd like to take a look.
 
Well, it won't work perfectly, since you're not using a nonproportional font, but this should get you close. First notice about how many characters or spaces are in the line before wrapping. The following formula assumes there is a break about every 10 characters. Adjust this as necessary.

Create two formulas:

//{@linecnt} to be placed in the detail section:
whileprintingrecords;
numbervar linecnt;

if len({table.col) >= 30 then
linecnt := linecnt + 4 else
if len({table.col) >= 20 then
linecnt := linecnt + 3 else
if len({table.col) >= 10 then
linecnt := linecnt + 3 else
if len({table.col) >= 0 then
linecnt := linecnt + 1;

//{@reset} to be placed in the page footer:
whileprintingrecords;
numbervar linecnt := 0;

Then base your page break on a linecount that works with the dimensions you want,e.g.,
{@linecnt} > 55

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top