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!

RE: Formula Help

Status
Not open for further replies.

allyne

MIS
Feb 9, 2001
410
US
Hello,

I have data that looks like the following

OrderID Lin1Resp(formula field) Line Ord Question

272 1 dog
272 2 yes
272 3 no

273 1 cat
773 2 dog
I Need a formula that will take the Line 1 ord Question and populate the Lin1resp field like the following. (there are many other fields and groupings in the report)


OrderID Lin1Resp(formula field) Line Ord Question

272 dog 1 dog
272 dog 2 yes
272 dog 3 no

273 cat 1 cat
773 cat 2 dog

Thanks for your help!
 
Assuming the report is sorted by OrderId this formula may be worth trying:

Code:
WhilePrintingRecords; //if the formula works without this line then it may be preferable to remove it
StringVar x;
if onfirstrecord or {MyTable.OrdId} <> previous({MyTable.OrdId}) then x := {MyTable.OrdQuestion} else x

Gordon BOCP
Crystalize
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top