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

Conditionally Format Titles Based on Report Section

Status
Not open for further replies.

ddnh

Programmer
Nov 25, 2002
94
US
I have a created a report that combines two reports. The first report is the main report, the second is a subreport that I have placed in the report footer . I have column headings that are the same for both reports, so I am placing them in the page header so they appear on each page. I also have a title for each report that I would like in the page header. I would like to place both formula fields (each title has an associated formula field) on top of one another and conditionally format them so only one shows up as appropriate. Here's the problem. I want Title1 to appear whenever there are details, and Title2 to appear when the report footer is showing. I formatted the report footer so a new page starts before the footer. Is there a way to conditionally format based on the section showing on the report?
 
There is always a way. Use a variable and the following formulas

In report Header (suppress printing)
Shared stringvar title:="heading for main report"

In Page Header
Shared stringvar title;

In subreport report Header (suppress printing)
Shared stringvar title:="heading for subreport" Editor and Publisher of Crystal Clear
 
Thanks for your help, but it's not working quite right. I've never used variables in a report before, so maybe I am doing something wrong. Here's what I did. I created three formulas: Title1, Title2, VariableTitle.

Title1
Shared stringvar title:=If {?Customer} = '%' then "Title text"

else {vw_1.CustDisplay} + " Title text"


Title2
Shared stringvar title:=If {?Customer} = '%' then "Title text 2"

else {vw_2.CustDisplay} + " Title text 2"


VariableTitle
Shared stringvar title;

I placed Title1 in the main report header and suppressd the section
I placed Title2 in the subreport report header and suppressd the section
I placed VariableTitle in the page header


Title1 is working just fine. It's in the page header throughout the report...including on the page that should only be displaying the subreport. Title2 is not showing up at all.

Any suggestions?
 
I didn't hear back from chelseatech. anyone else have a suggestion?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top