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

Value of Actual Field in Heading - Not Parameter Field

Status
Not open for further replies.

RoMarcus

MIS
Oct 16, 2007
45
0
0
US
I've seen several posts and answers for 'parameter' join function to show the value in the header of a parameter field and that works very well -- but does not work with a regualr field.

How do you do display the values in a field that is NOT a parameter field. Although I'm not reporting on produce - I would want something like.... "All Orders Placed Today Which Included BANANAS, APPLES, AND GRAPES."

These fruit items would not be a parameter field; rather I want a formula that would extrapulate this information from a field upon report generation. Is this possible? I appreciate all input.
Thank you.
 
Can this output be in the report footer instead of the header?

_____________________________________
Crystal Reports XI Developer Version
Intersystems Cache 5.X ODBC connection

 
Nevermind... try this

create this formula for the detail section
//stringaccumulate
stringvar output;
WhilereadingRecords;
if instr(output,{fruitfield}= 0 then
output:= output & " " & {fruitfield};
output

then create this formula and place it in the header
//stringoutput
global stringvar output;
WhilePrintingRecords;
output

_____________________________________
Crystal Reports XI Developer Version
Intersystems Cache 5.X ODBC connection

 
Nevermind... try this

create this formula for the detail section
//stringaccumulate
stringvar output;
WhilereadingRecords;
if instr(output,{fruitfield}= 0 then
output:= output & " " & {fruitfield};
output

then create this formula and place it in the header
//stringoutput
stringvar output;
WhilePrintingRecords;
output

_____________________________________
Crystal Reports XI Developer Version
Intersystems Cache 5.X ODBC connection

 
Thank you for the reply CoSpringsGuy.... That is close to what we came up with which is now working perfectly ... I failed to mention that the data is collected in a group; what we ended up with is the following which is very close to yours and basically does the same ....


Two Formulas;


{@FRUIT VALUE DATA COLLECT} ( in group header ‘fruit’, field suppressed)

whileprintingrecords;
shared stringvar fruittext ;
if not IsNull({ORDERS.FRUIT}) then
(
if (fruittext = '') then
fruittext := fruittext + {ORDERS.FRUIT}
else
fruittext := fruittext + ', ' + {ORDERS.FRUIT}
)



{@FRUIT VALUE FOOTER} ( in footing of the report)

shared stringvar fruittext; fruittext


Again, thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top