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

Record Detail to second page. 1

Status
Not open for further replies.

beanbrain

Programmer
Dec 31, 2001
170
I have a query that returns data from two tables. One table contains general information and the second detail information. The records returned repeat the general information on each record along with the dynamic data from the detail table such that the detail data changes and the general information does not.

Report Header A and Report Footer B need to print on the first page along with six records on Detail A.

Report Header B, Report Footer B and Detail B need to print on the second page ONLY if the number of records is greater than or equal to seven (7).

I'm using RecordNumber along with Suppress on the Headers, Footers, and Detail to suppress or allow these sections to print depending on the number of records. However, I cannot seem to generate a second page without "New Page After" which pushes the Detail A section to a page filling length.

Ideally a formula in the Suppress areas will allow me to control what gets printed where, but I'm stumped.

I am using Crystal Report 10 with Sybase.

Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
I think you should try to describe your problem again, being careful about the section names. You mention wanting to see report headers and report footers on page one and page two, when there are really only one report header and one report footer per report (unless you are using subreports). Can't really tell what you are trying to do because of this--don't know if you are referring to group headers and footers or page headers and footers.

-LB
 
lbass:


Thanks for replying. Here's what I'm trying to do. I have a government supplied form that I need to fill with data from two tables joined on a single field. The two tables represent data that occurs once in each report and a table that represents line item data in a detail section of the report. The data that occurs once for each report I have set up to be split between the header and footer of the report. The detail (line item) section is, of course, the detail section of the report.

Perhaps having two headers and two footers is not a good way to go. There can be any number of line items, but the first page of the report can only accomodate six lines. After that all subsequent lines need to appear on a second page with a minimal header and footer on either side of the detail.

I've tried doing this by splitting the "static" data between the header and footer with the detail section taking up to six lines.

This link will show you the report I'm trying to recreate in Crystal.


Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
You still didn't identify the sections you were using for the headers/footers. If the report is only for one header record, then you could use the page header and page footer sections. I'm not sure why you are using two detail sections. I think you could use just one, and then in the section expert->details->new page after->x+2, enter:

recordnumber = 6

To suppress pageheader_a on the second page, use:

pagenumber > 1

To suppress pageheader_b on the first page, use:

pagenumber = 1

Use the page footer section for the footer information.

If you plan to use more than one "header" record per report, then some these suggestions would have to be changed. If that is the case, please also identify the sections specifically and also explain what the second page is supposed to look like, e.g., would you want the details limited there, also?

-LB
 
lbass:

Thanks for your help. Turns out I had "Report Footer" where I should have been using "Page Footer."

Your suggestions were pretty much what I was using so you did provide validation. Of course my problem was I was using the wrong Report section type all the while thinking I was using the Page section type.

I now get six detail records with the same spacing for six if there are five or fewer detail records. This is as it should be. The report comes up the right length with the borders at .33 inches all the way around.

All records beyond six roll over to a new page with a slightly different Page header for any page higher than one.

The only problem I now have is the Page Footer two, which should be a single horizontal line, prints at mid-page instead of "snugged up" to the bottom of the rolled over detail section.

Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Try using a group footer section for the line. Even if you are only using one header record per report, you can insert a group on the header field, suppress the group header and use the group footer for the line.

-LB
 
Thanks again lbass.

Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top