The user wants to be able to enter a custom title depending on the selections they make. What is the syntax to prompt the user for a title to be displayed on the report.
(surprisingly I could not find a thread on this...)This message has been edited. Last edited by: <Kathryn Henning>,
WebFOCUS 8206.08 Windows, All Outputs
March 12, 2014, 04:57 AM
Dave
...probably you couldn't find it because it's basic functionality.
TABLE FILE ...
SUM ...
BY ...
WHERE ...
HEADING
"&CUSTOM_TITLE.Enter customtitle."
END
G'luck
_____________________ WF: 8.0.0.9 > going 8.2.0.5
March 12, 2014, 08:27 AM
RobertF
quote:
"&CUSTOM_TITLE.Enter customtitle."
Yes, I tied that earlier...prompts for the title but does not display it...perhaps something obvious I am missing...not sure....
TABLE FILE CAR PRINT CAR.ORIGIN.COUNTRY CAR.COMP.CAR CAR.CARREC.MODEL CAR.BODY.DEALER_COST CAR.BODY.RETAIL_COST HEADING ""&CUSTOM_TITLE.Enter customtitle." " " " ON TABLE SET PAGE-NUM NOLEAD ON TABLE NOTOTAL ON TABLE PCHOLD FORMAT EXL2K ON TABLE SET HTMLCSS ON ON TABLE SET STYLE * INCLUDE = endeflt, $ TYPE=REPORT, GRAPHCOLOR='GREEN',
WebFOCUS 8206.08 Windows, All Outputs
March 12, 2014, 08:31 AM
RobertF
nevermind, I need to loose the quotes..
WebFOCUS 8206.08 Windows, All Outputs
March 12, 2014, 08:53 AM
Dave
_____________________ WF: 8.0.0.9 > going 8.2.0.5
March 12, 2014, 09:35 AM
j.gross
quote:
nevermind, I need to loose the quotes..
Double double ==> Toil and trouble
Of course, if the user enters a string containing doublequotes, the output will be injected into "fire burn and cauldron bubble" mode.
You can avoid that by prompting up front,
* &CUSTOM_TITLE.Enter customtitle.
and then editing the &var
-SET &CUSTOM_TITLE = a defensive transformation of itself, using STRREP() for example
before insertion in the report.This message has been edited. Last edited by: j.gross,
March 12, 2014, 09:56 AM
Francis Mariani
How about never using prompt and build a parameter screen instead?
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
March 12, 2014, 01:17 PM
njsden
Francis, are you promoting use of HTML Composer now?
I am promoting the use of parameter screens of some kind. I believe the last time I used a prompt was in 1993 in a version of PC/FOCUS for DOS.
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
March 13, 2014, 03:34 AM
Dave
Francis,
I don't understand your question. ( how about never prompting ).
We make an fex with prompts. Somewhere in code, but we prefer to prompt for parameters in the beginning of the fex. e.g. -PROMPT &CUSTOM_TITLE.Custom title.;
...and THEN we make an html refering to this fex. Parameters are added to the form. Done.
meanwhile in the back of my mind while typing...
I think you mean autoprompt. Which makes me wonder what you mean with 'parameter screen instead'.
How would you make an parameter screen without having &CUSTOM_TITLE some where in the code?
In most contexts, a line of FOCUS code (whether in sysin or in FOCSTACK) that has a leading asterisk is treated as a comment. It's been that way forever-and-a-day, from the days when the only platform was VM/CMS. (Right, Gerry?)
March 13, 2014, 01:45 PM
Francis Mariani
When using HTML Composer to create a parameter screen for a report, all -DEFAULT &VARIABLE statements in the referenced report are used to create parameters and related controls (check-boxes, text-box, list boxes, etc). I've never user PROMPT to to this.
If you have -DEFAULT &CUSTOM_TITLE = ''; in the fex, then HTML Composer will create a parameter called CUSTOM_TITLE and a related control, which you can choose to be a text-box. I am not aware if -PROMPT &CUSTOM_TITLE.Custom title. does the same for HTML Composer.
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
March 13, 2014, 10:36 PM
susannah
Ah. CRTFORM.... i remember them ever so fondly. you could have several of them within the progress of a single fex... CRTFORM didn't stop the processing... it just paused it, to collect more input from you... so i had a wicked hard time coming to grips with HTMLFORM and why anybody would want to limit themselves in such a silly way. nice memory. thanks, george
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
March 14, 2014, 04:24 AM
Dave
Thanks Francis,
But we use -DEFAULT only to make sure a parameter has a default value... ( go figure )
-PROMPT isn't specific designed to launch autoprompt coz -DEFAULT will trigger it also.
Jack, You are right, a * in column 1 is treated as a comment BUT, the line is sent to the FOCSTACK whereas if you use -* it isn't.
And for all the "oldies" (me included), do you have customers with legacy FOCEXECs, using -CRTFORM and wanting to upgrade to WebFOCUS?This message has been edited. Last edited by: Danny-SRL,
Daniel In Focus since 1982 wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF