Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Go
New
Search
Notify
Tools
Reply
  
Conditional Subhead
 Login/Join
 
<ludo>
posted
Hi all,

Here is my monday issue. I'm trying to use the conditional clause When in my subhead but it doesn't as I would.
my request is :

TABLE FILE TEST
PRINT 
COMPUTE TOTO/A300 = POIDS || '%' || COURS AS ''

BY IDTEST
BY FLAG
BY IDRESTRICKING

ON IDTEST SUBHEAD 
"Caracteristique du produit"
" blabla"

ON IDRESTRICKING
"Sequence ludo"
WHEN FLAG EQ 1

ON IDRESTRICKING
"Restricking"
""
"Special output1"
"Special output2"
"Special output3"
WHEN FLAG GT 1;

WHERE RACINE EQ XXXX
END



The column Flag contains data as 1 , 2, 3,
4, ...

I need to output specific datas when flag equals 1 others data when flag greater than 1.

What occurs is :
-When I only put the first when (flag eq 1) I have the subhead above the line containing flag value
- When I put the two conditionnals phrase I only have subhead for the second condition.

I also tried to set my condition on the value '2' (when flag EQ 2 and when flag GT 2 )and it works fine . I can't explain when I test the value '1' I lose my lines where flag eq 1 ?

any idea
 
Reply With QuoteReport This Post
<JG>
posted
Bug,

Works fine in 7.6.4
 
Reply With QuoteReport This Post
<ludo>
posted
lol

I'm using 7.6.4
 
Reply With QuoteReport This Post
<JG>
posted
profile says 7.1.6

this is what I tested

TABLE FILE CAR
SUM
DC RC SALES
BY COUNTRY
BY MODEL
BY SEATS

ON COUNTRY SUBHEAD
"ABC"

ON MODEL SUBHEAD
"XXX"
WHEN SEATS EQ 2;

ON MODEL SUBHEAD
"YYY"
"ZZZ"
WHEN SEATS EQ 4;

ON TABLE PCHOLD FORMAT HTML
END

? REL
returns
EDA764 Release * Current Software:
EDA764 Release RELEASE = R720764B
EDA764 Release GEN_NUM = 246
EDA764 Release SOURCE_DATE = 11/14/2007 15:35:14
EDA764 Release BUILD_DATE = 11/14/2007 17:40:52
EDA764 Release INSTALLATION_DATE = 6/25/2008 14:13:55
 
Reply With QuoteReport This Post
Expert
posted Hide Post
quote:
WHERE RACINE EQ XXXX

no idea whether this is your problem or not,
but move this filter out of the way of your conditional SUBTOTAL statement.
Nice to learn that french for 'blahblah' is 'blabla' Smiler

can you write example w/ CAR file, please so we can run for you.
-s




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Reply With QuoteReport This Post
Virtuoso
posted Hide Post
A condition test on a subhead basically means this is the subhead for this condition, so if you want other information that might appear in another subhead, repeat it if that is what you are attempting. Bon Chance.


Leah
 
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Did you close all your WHENs and WHEREs (and COMPUTEs) with semicolons?


- Jack Gross
WF through 8.1.05
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Reply With QuoteReport This Post
<ludo>
posted
Thanks For your help
Merci pour votre aide

susannah : yes you can say blabla in french

Leah : Thanks for your support. I don't undestand everything you told me because i need the two conditions depending of the value of the flag field on my subhead.

JG : I tried your sample with the car file and it works . I ca^'t explain when flag is set to 1 webfocus don't output it ....

Merci à tous
The froggy
 
Reply With QuoteReport This Post
<JG>
posted
Ludo,

? DB source.

Try Sticking in an intermediate hold file. Stranger things have been known.
 
Reply With QuoteReport This Post
Virtuoso
posted Hide Post
When posting code for others to review, do them the courtesy of copying it accurately -- what you provided obviously cannot execute:

TABLE FILE TEST
PRINT 
COMPUTE TOTO/A300 = POIDS || '%' || COURS AS ''     <== missing ; 
                                          

BY IDTEST
BY FLAG
BY IDRESTRICKING

ON IDTEST SUBHEAD 
"Caracteristique du produit"
" blabla"

ON IDRESTRICKING                                    <== missing "SUBHEAD" keyword
"Sequence ludo"
WHEN FLAG EQ 1                                 

ON IDRESTRICKING                                    <== ditto
"Restricking"
""
"Special output1"
"Special output2"
"Special output3"
WHEN FLAG GT 1;

WHERE RACINE EQ XXXX            
END


- Jack Gross
WF through 8.1.05
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Reply With QuoteReport This Post
<ludo>
posted
Sir yes sir ...

Sorry for that
 
Reply With QuoteReport This Post
Master
posted Hide Post
quote:
ON IDRESTRICKING


Don't you need the word SUBHEAD on this?


Pat
WF 7.6.8, AIX, AS400, NT
AS400 FOCUS, AIX FOCUS,
Oracle, DB2, JDE, Lotus Notes
 
Posts: 755 | Location: TX | Registered: September 25, 2007Reply With QuoteReport This Post
  Powered by Social Strata  
 


Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.