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!

Retrieve Field values from detail section?

Status
Not open for further replies.

Manch

Programmer
Jun 12, 2001
43
0
0
US
Is there a way using formula fields or another method of retrieving values from records in the detail section and placing them in the page header section? For example, I have a report with 3 records in the detail section. I want to grab a value from a column in each of the three records and place those values in different fields in the page header. I tried formula fields like this:
Code:
PageHeaderFieldOne
If {Key Field From Detail Section} = 1 then
    Formula = {Description Field From Detail Section}
End if

PageHeaderFieldTwo
If {Key Field From Detail Section} = 2 then
    Formula = {Description Field From Detail Section}
End if

The problem is this formula does not get applied for each record in the detail section. The only PageHeaderField that displays is the one in the last record.

Is there a way to apply a formula to each record in the detail section?

Manch

 
For better results, try posting technical information when requesting it:

Crystal version
Database used
Example data
Expected output

Also output is limited to 254 chars of output in CR 8.5 and below.

A Page header occurs PRIOR to the data in the details, so this might prove a bit tricky.

You might create a faux page header by creating a group to use as the page header, and then using the minimum, maximum and average since you only have 3 rows.

Otherwise you might use a subreport in the page header to return the values in advance of reading them in the main report.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top