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

Change heading and orientation of subreport

Status
Not open for further replies.

thorntone

IS-IT--Management
Mar 2, 2001
12
0
0
US
Hi, I'm running Crystal 8.5 and need to figure out how to initiate a sub-report that has different headings and even orientation from the calling report.

The parent report is an invoice and the subreport is linked based on the invoice number from the parent. The parent is in landscape, and includes headings appropriate to the invoice such as customer order number, internal order number, product description, dimensions, unit price (sold by weight), weight, extended price...

The subreport merely lists the items that make up the invoice line item, without pricing. There is a one to many relationship between the invoice line item and the subreport list: one invoice line may result from 100 or more items in the subreport list. As the list is substantially longer than the invoice, I'd like to display it in portrait mode, and NOT include all of the headings from the invoice as they are not appropriate to the list.

I can't just create two different reports, as this report is called from a system that we cannot modify: it's not geared to run two reports.

I'm at a loss how to do this. I also considered the idea of "calling" a second report from the first, but I don't see that as a supported option within Crystal.

Thanks for your help.
 
Subreports take on the orientation of the main report, so I think you are stuck with landscape mode.

Can we assume that you are starting a new page for each new invoice, i.e., that you have "new page after" checked for the invoice group footer? If so,you can conditionally suppress the main report page header by using two formulas:

//{@false} to be placed in the invoice GH:
whileprintingrecords;
booleanvar subrpt := false;

//{@true} to be placed in the section where you are displaying the subreport--the GF? Or GH_b?

Then go to the section expert->page header->suppress->x+2 and enter:

whileprintingrecords;
booleanvar subrpt = true;

For the subreport headings, I would just create them in the subreport. First create a formula {@all} which is true for all records in the subreport,e.g.,:

{table.invoiceID} > 0

Then group on this formula and check "Repeat group header on each page." Place your "page header" fields in this group header.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top