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!

Need help on adding multiple row values into one value 1

Status
Not open for further replies.
Apr 18, 2007
209
US

Hello everyone, need some help to build a logic formula.

I have 3 groups and sample data as below
GH1 CA
GH2 Santa Barbara
GH3 94015
Det 10 S RA
20 A PA
30 S JA

where ever I have Value as S in second column, i need to sum up those values separated by / and show data like below


10 S RA/JA
20 A PA
30 S RA/JA



Any help will be greatly appreciated.
 

Not exactly sure what you are looking for but take a look at running total fields and evaluate based on a formula. If this is way off please clarify what you need a bit better please.
 
Are the 10 and the 30 affecting each other, or is there other data we're not seeing? If 10 has the /JA because 30 has an S, then I don't see a way to do it without subreports.
 
i may be WAY off, it is the 4th Monday of the week and I have not completed a single cup of coffee yet today, so apologies if i totally missed it.

if your report can be changed to add a group on the 'S'/'A' field, you could suppress the details section and display data in the Group Footer 4 (S-A Value Field)
use a formula in the suppressed details to combine your fields and a second one in the GF4 to display them. something sorta like:

//{@Combine}
stringvar sv;
IF {table.SAValueField} = "S" then sv := sv & "/" & {table.RAJAValueField} else sv := sv;

//{@Display)
stringvar sv;
sv

You would still need to place the real table/field names for {table.RAJAValueField} in the RF4 on top of the display formula, and then set suppression criteria for both the database field and the display formula so that only the appropriate one was shown.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top