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

need to do different selection criteria on same field&showinSingleLine 1

Status
Not open for further replies.

mintman

IS-IT--Management
Mar 5, 2007
66
US
Hello friends I have this situation, I have the fields
DivertLocation, Priority, Stat, (ShipPoint,Sortpoint,ShipVia,Rule(allthese 4 fields use samefield IRFLNM) each of those 4 fields use different selection criteria like if for SHIPOINT--irflm=09 then "YES"
Sortpoint--irflm=33 then "GOH"..like this i need to display all of the on single line.
Example
ShipPoint Sortpoint ShipVia Rule---Field Headings
IRFLNM IRFLNM IRFLNM IRFLNM ---fields
if=9 if = 4 if = "CTP" if = 3459
show show show show
YES BB Hello SHIPPED---need to be displayed like this on same line.

Please can anyone give some suggestions.
Thanks.
Reed
 
Well the easy way is to create 4 formulas call F1, F2,F3,F4 and place then in the field.

ShipPoint Sortpoint ShipVia Rule
@F1 @F2 @F3 @F4
 
I will give a shot now, thanks a lot.
Reed
 
i did that and now i get data like
LOC Pri STAT SP SV ShipVi Rule
wwe1 325 00 ---- Cexpress ---- ------
wwe1 325 00 ---- -------- ---- CEXD

I want this to be diaplayed as

wwe1 325 00 --- Cexpress --- CEXD
 
Insert maximums on each conditional formula at the group level (not sure what you are using for this, location?) and then suppress the detail section.

-LB
 
wow...this sounds good...I will do this..and sorry by mistake i posted other post..
Thanks,
Reed
 
I Have a new problem now..i did the summarty and it worked perfect. But what i have a or condition SV, it can have two value or more for the same condition. How to join them.
Suppoe
SV has Columbus or Reynoldsburg, if I do summary it only shows columbus, I also want o display Reynoldsburg like
Columbus/Reylodsburg.

Thank you so much again
Reed
 
I'll assume you have a group on the field that you want to summarize based on. You need to use three formulas:

//{@reset} to be placed in the group header and suppressed:
whileprintingrecords;
stringvar sv;
if not inrepeatedgroupheader then
sv := "";

//{@accum} to be placed in the detail section and suppressed:
whileprintingrecords;
stringvar sv;
if {table.IRFLNM} = "CTP" and
instr(sv,{table.description}) = 0 then
sv := sv + {table.description} + "/";

//{@display} to be placed in the group footer:
whileprintingrecords;
stringvar sv;
if len(sv) > 1 then
left(sv,len(sv)-1)

This assumes that you are using a field like {table.description} in your conditional formulas, like:

if {table.IRFLNM} = "CTP" then {table.description}

-LB
 
Hello LB, I will try this today. Thank a lot for the valuable suggestions.
Reed
 
One last question:

LOC Pri STAT SP SV ShipVi Rule
wwe1 325 00 ---- Cexpress ---- -----
wwe1 325 00 ---- -------- ---- CEXD

here im grouping on LOC and then priority

if i do summary on them I get like
LOC Pri STAT SP SV ShipVi Rule
wwe1 325 00 ---- Cexpress ---- CEXD

suppose if SV has two values Cexpress and USPS and Rule has two vaues DEXD AND CEXD.ie,
LOC Pri STAT SP SV ShipVi Rule
wwe1 325 00 1 Cexpress ---- CEXD
wwe1 325 00 ---- USPS 3 DEXD


I want to show them like this

LOC Pri STAT SP SV ShipVi Rule
wwe1 325 00 1 Cexpress 3 CEXD
wwe1 325 00 1 USPS 3 DEXD
it has union statement, LB told me While priting recorrds, but now the requirement is to diaply the new value in different line, but it has to show all the values.
Can anyone please help on this
Thanks a lot.



 
Hello LB the one u suggested worked really great, but they want to see in other criteria too as I mentioned above, can you give me any idea.
Thanks a lot again
Reed
 
Since your examples show only one value for each group, it's hard to see what you want. If the issue is just getting "SP" and "Ship Via" in both lines, then create a formula for each and place them in the detail section:

maximum({table.sp},{table.groupfield})

Repeat for {table.shipvia}.

-LB
 
LB,
thia can happen to any of these SP,SV ,ShipVi,Rule,...I want to all of them in the same footer with the repeated values. I will try the above logic you told me.
Thanks a lot
Reed
 
You need to show some samples that show multiples of each group, both as raw data and then displayed as you like. You aren't accurately representing the problem here, I don't think.

You also mentioned a union statement here, but without explaining why this is relevant.

-LB
 
LOC Pri STAT SP SV ShipVi Rule

Ok for the above fields SP,SV,ShipVia, Rule I am using the same field IRFLNM, so what i did here was took the same tables (IRFL00) 3 times. So for SP I useIRFLOO.IRFLNM
sor SV IRFL01.IRFLNM1 and for ShipVia-IRFL02.IRFLNM3
for RULE--IRFL03.IRFLNM3 so for each field i have formula if IRFL01.IRFLNM1 or IRFL002.IRFLNM2 .. so on = "some field name" then display corresponding value from field IRFLVN.

here is a example this is details section
LOC Pri STAT SP SV ShipVi Rule
SS 25 00 TB --- USPS UGRD
SS 25 00 -- 65 ----- ---
SS 25 00 GB -- ------ ----

So here i am grouping LOC,Pri,STAT
now I want to display data like
LOC Pri STAT SP SV ShipVi Rule
SS 25 00 TB 65 USPS UGRD
SS 25 00 GB 65 USPS UGRD

Now there will another group in details sec
LOC Pri STAT SP SV ShipVi Rule
Sa 45 00 TB --- USPS UGRD
Sa 45 00 -- 65 FeDEX ---

where I want to display
LOC Pri STAT SP SV ShipVi Rule
Sa 45 00 TB 65 USPS UGRD
Sa 45 00 TB 65 FeDEX UGRD

So here in the details sec if I do the Summary at the group level it works fine if there are no different values for the same field. If it has 2 different values , it takes only the first one for the summary value.

I am very sorry if I was unclear in my previous posts. Thanks a lot again
Reed





 
Lb, in the above example previsouly we were showing / so instead of that ia there any function to display data in next line?
Thanks.
 
You could collect each field in a separate variable and then display each by using a chr(13) instead of a "/". You would have to format the display formulas to "can grow.

-LB
 
Awsome....this worked really good. Thanks again.Learning a lot of stuff.
Reed
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top