{SOLVED}Amper Variable usage in heading when value is _FOC_NULL
Okay there has to be a way to do this, but I am at a loss. I have two amper variables (&Ethnicity and &Gender) I am using an html launch page with comboboxes to make the selections. When 'all' is selected for either parameter the value becomes _FOC_NULL. I am using the amper variables in the heading of my report and it really looks like crap with _FOC_NULL in it. I would like to have it say something a bit more pleasant like "All Genders", but no matter what I try I can not get rid of the _FOC_NULL. Below is the code I have tried. Any help would be appreciated.
I just tried gender first, to see if it would work.
ON TABLE SUBHEAD
"Registered"
IF &Gender EQ _FOC_NULL THEN GOTO ALL_SELECTED;
"ÐNICITY , &Gender "
-GOTO MORE_CODE;
-ALL_SELECTED
"All Genders"
-MORE_CODE
"Students for &TERM_DESC "
FOOTING
"Page:<TABPAGENO of<TABLASTPAGE <+0> <+0> <+0> <+0>&DATEtrMDYY"
I also tried using a variable instead of the amper variable. It didn't work either.
DEFINE GENDERAMP/A15V IF &Gender EQ _FOC_NULL THEN "All Genders" ELSE &Gender.This message has been edited. Last edited by: MAdams1,
WebFOCUS Server 8.1.05 Windows 2008 Server WebFOCUS AppStudio 8.1.05 Windows 7 Professional IE 11 and Chrome Version 43.0.2357.124 m. Mostly HTML, PDF, Excel, and AHTML
January 07, 2011, 12:25 PM
Tom Flynn
quote:
IF &Gender EQ _FOC_NULL THEN GOTO ALL_SELECTED;
You need a DASH, and, probaly quotes; it is Dialogue Manager code:
-IF &Gender EQ '_FOC_NULL' GOTO ALL_SELECTED;
hth
RANT: GREAT! FOC_NONE replaced with _FOC_NULL. Another peachy feature! Well, I hope IBI has enough consultant $$$'s to send THEIR consultants out and change ALL the code w/FOC_NONE!
Another marvelous feature; and they wonder why COGNOS is becoming the way to go...
OOPS- I did have the dash and the quotes. It still didn't work. I checked my code again and they are there, but doesn't work. Dev Studio doesn't like something, it won't even let me out of the source tab.
WebFOCUS Server 8.1.05 Windows 2008 Server WebFOCUS AppStudio 8.1.05 Windows 7 Professional IE 11 and Chrome Version 43.0.2357.124 m. Mostly HTML, PDF, Excel, and AHTML
-? &G
-EXIT
TABLE FILE PEOPLE_DIM
PRINT
BY 'PEOPLE_DIM.PEOPLE_DIM.LCLastName' NOPRINT
BY 'PEOPLE_DIM.PEOPLE_DIM.FIRST_NAME' NOPRINT
BY 'PEOPLE_DIM.PEOPLE_DIM.FULL_NAME' AS 'Student Name'
BY 'PEOPLE_DIM.PEOPLE_DIM.VNUM' AS 'Valley,Number'
BY 'PEOPLE_DIM.PEOPLE_DIM.PhoneOUT' AS 'Phone'
BY 'PEOPLE_DIM.PEOPLE_DIM.DEGREE_SOUGHT_DESC' AS 'Major'
BY 'J10.STUDENT_SEMESTER_GPA_FACT.HoursEarnedOut' AS 'Semester,Hrs Earned'
BY 'J10.STUDENT_SEMESTER_GPA_FACT.SemesterGPAOut' AS 'Semester,GPA'
BY 'J0.STUDENT_OVERALL_GPA_FACT.OverallGPAOut' AS 'Overall,GPA'
BY TOTAL COMPUTE MYCNTR/I5C = IF PEOPLE_DIM.PEOPLE_DIM.PIDM EQ LAST PEOPLE_DIM.PEOPLE_DIM.PIDM THEN MYCNTR + 0 ELSE MYCNTR + 1; NOPRINT
ON TABLE SUBHEAD
"Registered"
-IF &Gender.EVAL EQ '_FOC_NULL' GOTO ALL_SELECTED;
"ÐNICITY , &Gender "
-GOTO MORE_CODE;
-ALL_SELECTED
"All Genders"
-MORE_CODE
"Students for &TERM_DESC "
FOOTING
"Page:<TABPAGENO of<TABLASTPAGE <+0> <+0> <+0> <+0>&DATEtrMDYY"
ON TABLE SUBFOOT
" <+0> "
" <+0> "
"Total Students:<TOT.MYCNTR"
" "
"Parameters Choosen:<+0> "
"Gender: &Gender"
"Ethnicity: ÐNICITY"
"Term:<+0>&TERM_DESC"
"Output: &WFFMT"
" "
"&FOCFEXNAME <+0> <+0> <+0> <+0> <+0> <+0>End of Report"
" "
" "
" "
WHERE PEOPLE_DIM.PEOPLE_DIM.GenderLCase EQ '&Gender.(FIND PEOPLE_DIM.PEOPLE_DIM.GENDER,PEOPLE_DIM.PEOPLE_DIM.GENDER IN people_dim).Gender.';
WHERE PEOPLE_DIM.PEOPLE_DIM.ETHNICITY EQ 'ÐNICITY.(FIND ETHNICITY,PEOPLE_DIM.PEOPLE_DIM.ETHNICITY IN people_dim).ETHNICITY.';
WHERE J7.STUDENT_REGISTRATION_FACT.ACTIVE_FLAG EQ 1;
WHERE PEOPLE_DIM.PEOPLE_DIM.DEAD_IND EQ 'N';
WHERE J11.TERM_DIM.TERM_DESC EQ '&TERM_DESC.(FIND TERM_DIM.TERM_DIM.TERM_DESC,TERM_DIM.TERM_DIM.TERM_DESC IN term_dim).Term.';
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT &WFFMT.(<HTML,HTML>,<PDF,PDF>,<Excel 2000,EXL2K>,<HTML Active Report,AHTML>).Select type of display output.
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
INCLUDE = endeflt,
WebFOCUS Server 8.1.05 Windows 2008 Server WebFOCUS AppStudio 8.1.05 Windows 7 Professional IE 11 and Chrome Version 43.0.2357.124 m. Mostly HTML, PDF, Excel, and AHTML
January 07, 2011, 12:52 PM
Tom Flynn
Do Cntl+A, Cntl+C and copy the code into a Notepad txt document; keep it open. Then just close out Dev Studio. Go back into Dev Studio, open the FEX, Cntl+A and hit the Delete button. Then copy the Notepad code back into the Fex and save...
WebFOCUS Server 8.1.05 Windows 2008 Server WebFOCUS AppStudio 8.1.05 Windows 7 Professional IE 11 and Chrome Version 43.0.2357.124 m. Mostly HTML, PDF, Excel, and AHTML
January 07, 2011, 01:02 PM
MAdams1
Okay, I did that. Same thing..I'm stuck in source.
WebFOCUS Server 8.1.05 Windows 2008 Server WebFOCUS AppStudio 8.1.05 Windows 7 Professional IE 11 and Chrome Version 43.0.2357.124 m. Mostly HTML, PDF, Excel, and AHTML
January 07, 2011, 01:07 PM
Tom Flynn
OK, you are using AutoPrompt, not a HTML page. I don't know what you mean, "I'm stuck in source".
The reason may be this:
WHERE PEOPLE_DIM.PEOPLE_DIM.ETHNICITY EQ 'ÐNICITY.(FIND ETHNICITY,PEOPLE_DIM.PEOPLE_DIM.ETHNICITY IN people_dim).ETHNICITY.';
That is strange. I don't see the strange character. Mine says &Ethnicity.
This is the code for the FEX that is used by the html launch page. I am testing in the FEX. What I mean by "stuck in source" is when I am adjusting the code manually(not in the GUI) using the source tab at the bottom, after I make the changes I am held captive in this tab. I can not get back to the report tab(the GUI). It's telling me it doesn't like something(I just wish it would tell me what the something is!). The only way out is to close the screen, then I lose the code I added.
WebFOCUS Server 8.1.05 Windows 2008 Server WebFOCUS AppStudio 8.1.05 Windows 7 Professional IE 11 and Chrome Version 43.0.2357.124 m. Mostly HTML, PDF, Excel, and AHTML
January 07, 2011, 01:22 PM
Tom Flynn
Edit the code in text, right-click the fex and select text editor...
Yes, the GUI does not like most Dialogue Manager code. If you utilize this type of coding, it will not open in the GUI anymore, only in the Text Editor...
You are PROMPTing for the selected values via the code in your fex; that is called AutoPrompting, as it says when the browser page opens...
-*SET INP1
-*SELECT COUNTRY
-* 0 ALL
-* 1 ENGLAND
-* 2 FRANCE
-* 3 ITALY
-* 4 JAPAN
-* 5 W GERMANY
-SET &INP1 = 1;
-*SET INP2
-*SELECT CAR
-* 0 ALL
-* 1 ALFA ROMEO
-* 2 AUDI
-* 3 BMW
-* 4 DATSUN
-* 5 JAGUAR
-* 6 JENSEN
-* 7 MASERATI
-* 8 PEUGEOT
-* 9 TOYOTA
-* 10 TRIUMPH
-SET &INP2 = 0;
-SET &WHCNTRY = DECODE &INP1(0 '-*'
- 1 'WHERE COUNTRY EQ ''ENGLAND'''
- 2 'WHERE COUNTRY EQ ''FRANCE'''
- 3 'WHERE COUNTRY EQ ''ITALY'''
- 4 'WHERE COUNTRY EQ ''JAPAN'''
- 5 'WHERE COUNTRY EQ ''W GERMANY''');
-SET &COUNTRY = DECODE &INP1(0 'CNTRYHD/A20 = ''ALL COUNTRIES'';'
- ELSE 'CNTRYHD/A20 = COUNTRY;');
-SET &WHCAR = DECODE &INP2(0 '-*'
- 1 'WHERE CAR EQ ''ALFA ROMEO'''
- 2 'WHERE CAR EQ ''AUDI'''
- 3 'WHERE CAR EQ ''BMW'''
- 4 'WHERE CAR EQ ''DATSUN'''
- 5 'WHERE CAR EQ ''JAGUAR'''
- 6 'WHERE CAR EQ ''JENSEN'''
- 7 'WHERE CAR EQ ''MASERATI'''
- 8 'WHERE CAR EQ ''PEUGEOT'''
- 9 'WHERE CAR EQ ''TOYOTA'''
- 10 'WHERE CAR EQ ''TRIUMPH''');
-SET &CAR = DECODE &INP2(0 'CARHD/A20 = ''ALL CARS'';'
- ELSE 'CARHD/A20 = CAR;');
-*
DEFINE FILE CAR
&COUNTRY.EVAL
&CAR.EVAL
END
-*
TABLE FILE CAR
HEADING CENTER
"COUNTRY = <CNTRYHD"
"CAR = <CARHD"
PRINT
COUNTRY
CAR
MODEL
BODYTYPE
SEATS
DEALER_COST
RETAIL_COST
SALES
BY COUNTRY NOPRINT
BY CAR NOPRINT
&WHCNTRY.EVAL
&WHCAR.EVAL
END
-EXIT
Glenda
In FOCUS Since 1990 Production 8.2 Windows
January 07, 2011, 01:57 PM
MAdams1
Tom, Thank you for your help. I edited it in the text editor(which is what I thought I was doing by going into the source tab) and IT WORKS!!
Glenda, Thank you for the code. I will have to look that over.
WebFOCUS Server 8.1.05 Windows 2008 Server WebFOCUS AppStudio 8.1.05 Windows 7 Professional IE 11 and Chrome Version 43.0.2357.124 m. Mostly HTML, PDF, Excel, and AHTML
January 07, 2011, 02:02 PM
Tom Flynn
MAdams,
Your Welcome. Edit your 1st Post and Place {Solved} in the Heading.
FYI, I don't use the GUI, and, when I am directed to just use the AutoPrompt, I use -PROMPT. May want to read up on that...
Glenda, she needs to PROMPT for her values to be selected. -SET will not work.
Thank you Tom. I am still learning as I go and always appreciate the advise and help.
WebFOCUS Server 8.1.05 Windows 2008 Server WebFOCUS AppStudio 8.1.05 Windows 7 Professional IE 11 and Chrome Version 43.0.2357.124 m. Mostly HTML, PDF, Excel, and AHTML