Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Prompt for a Report Title

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Prompt for a Report Title
 Login/Join
 
Master
posted
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
 
Posts: 603 | Registered: June 28, 2013Report This Post
Master
posted Hide Post
...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
 
Posts: 668 | Location: Veghel, The Netherlands | Registered: February 16, 2010Report This Post
Master
posted Hide Post
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
 
Posts: 603 | Registered: June 28, 2013Report This Post
Master
posted Hide Post
nevermind, I need to loose the quotes..


WebFOCUS 8206.08
Windows, All Outputs
 
Posts: 603 | Registered: June 28, 2013Report This Post
Master
posted Hide Post
Roll Eyes Smiler


_____________________
WF: 8.0.0.9 > going 8.2.0.5
 
Posts: 668 | Location: Veghel, The Netherlands | Registered: February 16, 2010Report This Post
Virtuoso
posted Hide Post
quote:
nevermind, I need to loose the quotes..


Double double ==> Toil and trouble
Smiler

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,
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Expert
posted Hide Post
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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Virtuoso
posted Hide Post
Francis, are you promoting use of HTML Composer now? Big Grin



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Expert
posted Hide Post
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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Master
posted Hide Post
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?



@j.gross
quote:
* &CUSTOM_TITLE.Enter customtitle.


is that even valid / supported code?


_____________________
WF: 8.0.0.9 > going 8.2.0.5
 
Posts: 668 | Location: Veghel, The Netherlands | Registered: February 16, 2010Report This Post
Master
posted Hide Post
What, no CRTFORM Francis ?


WebFOCUS 7.7.05 Windows, Linux, DB2, IBM Lotus Notes, Firebird, Lotus Symphony/OpenOffice. Outputs PDF, Excel 2007 (for OpenOffice integration), WP
 
Posts: 674 | Location: Guelph, Ontario, Canada ... In Focus since 1985 | Registered: September 28, 2010Report This Post
Virtuoso
posted Hide Post
quote:
is that even valid / supported 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?)
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Expert
posted Hide Post
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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
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
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Master
posted Hide Post
Thanks Francis,

But we use -DEFAULT only to make sure a parameter has a default value... ( go figure Wink )

-PROMPT isn't specific designed to launch autoprompt coz -DEFAULT will trigger it also.

....but I understand your point.


I guess
-PROMPT &PARAM;
and
-DEFAULT &PARAM = '';

render the same results.


_____________________
WF: 8.0.0.9 > going 8.2.0.5
 
Posts: 668 | Location: Veghel, The Netherlands | Registered: February 16, 2010Report This Post
Virtuoso
posted Hide Post
Ah the problems of "user entered quotes"!

Try the following:
-SET &EXAMPLE='User entered " a problem';
-SET &EXLEN=&EXAMPLE.LENGTH;
-SET &EXAMPLE=STRREP (&EXLEN, &EXAMPLE, 1, '"', 1, HEXBYT(216, 'A1'), &EXLEN, 'A&EXLEN.EVAL');

For single quotes, use HEXBYT(215, 'A1')

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

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Prompt for a Report Title

Copyright © 1996-2020 Information Builders