August 25, 2008, 09:04 AM
<ludo>Conditional Subhead
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
August 25, 2008, 09:20 AM
<JG>Bug,
Works fine in 7.6.4
August 25, 2008, 09:28 AM
<ludo>lol
I'm using 7.6.4
August 25, 2008, 09:35 AM
<JG>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
August 25, 2008, 10:56 AM
susannahquote:
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'
can you write example w/ CAR file, please so we can run for you.
-s
August 25, 2008, 11:22 AM
LeahA 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.
August 25, 2008, 11:35 AM
j.grossDid you close all your WHENs and WHEREs (and COMPUTEs) with semicolons?
August 25, 2008, 11:44 AM
<ludo>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
August 25, 2008, 12:28 PM
<JG>Ludo,
? DB source.
Try Sticking in an intermediate hold file. Stranger things have been known.
August 25, 2008, 05:15 PM
j.grossWhen 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
August 26, 2008, 05:16 AM
<ludo>Sir yes sir ...
Sorry for that
August 26, 2008, 09:13 AM
PBrightwellquote:
ON IDRESTRICKING
Don't you need the word SUBHEAD on this?