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     [CLOSED] Escape Character for Subfoots

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Escape Character for Subfoots
 Login/Join
 
Guru
posted
Is there an escape character that will allow me to use double quotes within a subfoot?
The only way that I could get it to work was to create a DEFINE. A -SET variable did not work either.

-* -SET does not work
-SET &PHRASE = '"Double Quote"';

-* DEFINE does work
DEFINE FILE CAR
PHRASE/A20 = '"Double Quote"';
END

TABLE FILE CAR
PRINT
      DEALER_COST
      RETAIL_COST
BY COUNTRY
BY CAR
ON COUNTRY SUBFOOT
"Example "Double Quote" in HEADING, SUBFOOT, SUBHEAD, etc."
"Example <PHRASE in HEADING, SUBFOOT, SUBHEAD, etc."
END

Regards,
Max

This message has been edited. Last edited by: Kerry,


WebFOCUS 8.1.05M Unix Self-Service/MRE/Report Caster - Outputs Excel, PDF, HTML, Flat Files
 
Posts: 320 | Location: Memphis, TN | Registered: February 12, 2008Report This Post
Virtuoso
posted Hide Post
The trick I use (which you essentially have already used) is to define a field that is the double quote:

Is there an escape character that will allow me to use double quotes within a subfoot?
The only way that I could get it to work was to create a DEFINE. A -SET variable did not work either.

-* DEFINE does work
DEFINE FILE CAR
PHRASE/A20 = '"Double Quote"';
QUOTE/A1='"';
END

TABLE FILE CAR
PRINT
      DEALER_COST
      RETAIL_COST
BY COUNTRY
BY CAR
ON COUNTRY SUBFOOT
"Example <QUOTE><+0> in HEADING, SUBFOOT, SUBHEAD, etc."
"Example <PHRASE in HEADING, SUBFOOT, SUBHEAD, etc."
END


Anything in a footing, etc. has to be a field or text character. The &variable would not work because it would simple replace the &var with the literal string which includes the quote and then it processes the same as if you had typed in the quote.


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report This Post
Expert
posted Hide Post
The only downside to using a DEFINE is that it is evaluated for every row of data in the internal matrix - an unnecessary overhead if you have millions of rows. COMPUTE is only slightly better as it is only evaluated for each row of output.

Using a variable would, of course, be better still as Darin suggests, but the double quote in the variable would get interpreted as the end of the header!

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Expert
posted Hide Post
Max,

You don't specify which output formats you'd like this to work for, but here is an example of how to get a double-quote into a subfoot using a Dialogue Manager variable:

-SET &DQ = '"';

TABLE FILE CAR
PRINT
DEALER_COST
RETAIL_COST
BY COUNTRY
BY CAR
ON COUNTRY SUBFOOT
"EXAMPLE !IBI.AMP.DQ; IN HEADING, SUBFOOT, SUBHEAD, ETC."
ON TABLE HOLD AS H001 FORMAT HTMTABLE
END
-RUN

-HTMLFORM BEGIN
!IBI.FIL.H001;
-HTMLFORM END

The !IBI.AMP.DQ; is evaluated only when the output hold file is displayed via the HTMLFORM statement.


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
Francis,

The words "sledge hammer" "nut" "crack" come to mind but congratulations on finding a method of filling your time! Wink Razzer

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Expert
posted Hide Post
There is no other way of displaying content in a report AFTER the report has been created, so I like using this technique to embed the elapsed time of a report in the subfoot.


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
Guru
posted Hide Post
Francis,

Cool trick.
I was looking for a solution for PDF but your solution will have to do.
Gotta love those bang variables.

Regards,
Max


WebFOCUS 8.1.05M Unix Self-Service/MRE/Report Caster - Outputs Excel, PDF, HTML, Flat Files
 
Posts: 320 | Location: Memphis, TN | Registered: February 12, 2008Report This Post
Expert
posted Hide Post
I'm sure this trick could be used for very creative HTML reports.

Have you considered using two single-quotes? With most proportional fonts, they sure look like one double-quote to me.

TABLE FILE CAR
SUM SALES
BY CAR
HEADING
"''WEBFOCUS'' REPORT"
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
TYPE=REPORT, FONT=ArialL, SIZE=9, $
ENDSTYLE
END


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
Guru
posted Hide Post
No, I never thought about that and your absolutely right two single quotes do look like double quotes.

Thanks,
Max


WebFOCUS 8.1.05M Unix Self-Service/MRE/Report Caster - Outputs Excel, PDF, HTML, Flat Files
 
Posts: 320 | Location: Memphis, TN | Registered: February 12, 2008Report This Post
Expert
posted Hide Post
quote:
There is no other way of displaying content in a report AFTER the report has been created
Well actually there is, and this is what I meant - In HTML there is the method of obtaining such things as <, > & and of course ". All you have to do in WF is to harness that -

-SET &DQuote = '&|quot;';
-SET &LCarat = '&|lt;';
-SET &RCarat = '&|gt;';
-SET &Amper = '&|amp;';
TABLE FILE CAR
SUM RCOST DCOST
 BY COUNTRY
 BY CAR
 BY MODEL
HEADING
"Using Variable in Heading - &DQuote &LCarat &RCarat &Amper"
END

No need to go to the lengths of !IBI.AMP.variable; in an HTMLFORM for HTML output of one of these chars. Just assign it to a variable. Easy

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Expert
posted Hide Post
Although I must add that I, too, make use of the method that Francis indicates but for embedding the logged in Userid into a form hidden input control which can help sometimes when you need the logged in Userid.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
<JG>
posted
The man wants PDF output.

Download GSAR from the GNU open source people (it's freeware) and copy it to a known location on the server

Use a character such as a tilda '~' to represent the "
Create your PDF file as a HOLD not a PCHOLD and zap it

TABLE FILE CAR
" This is a Double Quote ~ "
SUM DC
BY COUNTRY
FOOTING BOTTOM
"This is also a Double Quote ~"
ON TABLE HOLD FORMAT PDF
END
-RUN
-* zap the PDF and present it using -HTMLFORM (you must escape the ")
! c:\ibi\gsar -s~ -r\" -o HOLD.PDF
-RUN
SET HTMLFORMTYPE=PDF
-HTMLFORM HOLD
 
Report This Post
Virtuoso
posted Hide Post
Or just keep with the defined field.
Should work ok for all output formats, and just forget about the overhead - which is pretty small anyway.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
<JG>
posted
quote:
Or just keep with the defined field.

That's the IBI solution and so is the best way to go.

Someone really should raise an NFR for a generic escape sequence in headers/footers etc.

Only being to escape & using &| is a big failing.
 
Report This Post
Expert
posted Hide Post
It would be nice to be able to use the unicode characters of 8220 (#201C) and 8221 (#201D) for the opening and clolsing quotation marks but unfortunately HEXBYT does not use unicode Frowner

I wonder if Waz with his penchant for dabbling with the inner workings of PDF files can do anything?

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Virtuoso
posted Hide Post
The only other thought I can add to this is to change the DEFINE field to a COMPUTE. If there is a SUM in the report then using a COMPUTE will reduce the number of times the double quote field will be calculated.

TABLE FILE CAR
SUM DEALER_COST RETAIL_COST
COMPUTE PHRASE/A20 = '"Double Quote"'; NOPRINT
BY COUNTRY
BY CAR
ON COUNTRY SUBFOOT
"Example <PHRASE in HEADING, SUBFOOT, SUBHEAD, etc."
END


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
 
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003Report This Post
Expert
posted Hide Post
I just did a quick test.

I Copied the Unicode chars from CHARMAP and pasted them into the fex.

Hopefully this doesn't get corrupted in the posting.

TABLE FILE CAR
HEADING
"“Quotes”"
PRINT COUNTRY
ON TABLE PCHOLD FORMAT PDF
END


See if this works for you


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Virtuoso
posted Hide Post
Left and right double-quote have extended (8-bit) ASCII codes:

“ = x'93' = 147 decimal
” = x'94' = 148


- Jack Gross
WF through 8.1.05
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Expert
posted Hide Post
Thanks Jack! I ran a test before my last post with an iterative loop pushing the iteration number into HEXBYT, looking for the equivalents. For some reason I didn't spot these ones - AGE perhaps?! Wink

So, using Jack's info we can do this -

-SET &DQuoteL = HEXBYT(147,'A1');
-SET &DQuoteR = HEXBYT(148,'A1');
TABLE FILE CAR
SUM RCOST DCOST
 BY COUNTRY
 BY CAR
 BY MODEL
 ON TABLE PCHOLD FORMAT PDF
HEADING
"&DQuoteL Using Variable in Heading &DQuoteR"
END

A far more satisfying method for all(?) output formats.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Virtuoso
posted Hide Post
... unless you're in an alternate universe where source libraries are stored in EBCDIC. Roll Eyes


- Jack Gross
WF through 8.1.05
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Expert
posted Hide Post
quote:
iterative loop


Tony, your post activated a couple of lost neurons. I just remembered we have this little fex here for displaying a character map.

DEFINE FILE SYSCOLUM
 CNTR/I9 WITH NAME = IF LAST CNTR EQ 0 THEN 32 ELSE LAST CNTR + 1 ;
 Cntr/I9 WITH NAME = CNTR - 32 ;
 Col/I9  WITH NAME = (Cntr / 30) + 1 ;
 Row/I9  WITH NAME = IMOD(Cntr, 30, 'I9') ;
END
TABLE FILE SYSCOLUM
   SUM CNTR 
       COMPUTE
       CHAR/A1 = HEXBYT(CNTR, 'A1') ;
ACROSS Col	NOPRINT
BY Row		NOPRINT
WHERE RECORDLIMIT EQ 224
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET STYLE *
UNITS=CM, PAGESIZE='A4', LEFTMARGIN=0.635000, RIGHTMARGIN=0.635000,
    TOPMARGIN=0.635000, BOTTOMMARGIN=0.635000, SQUEEZE=ON,
    ORIENTATION=LANDSCAPE, $
TYPE=REPORT, GRID=OFF, FONT=TIMES NEW ROMAN, $
ENDSTYLE
END


Why didn't I remember this before? Anyway, just change the font and or output format and run.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Expert
posted Hide Post
quote:
a couple of lost neurons
Reminds me of a good joke, but not one I could repeat here Wink

Glad you found them Warren, you never know when you're going to need them!!

Useful fex and very similar method but in grid format Smiler

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Virtuoso
posted Hide Post
Both the solution of replacing a double-quote with 2 single-quotes and the HEXBYT(148) trick also fix the same issue for axis-labels in GRAPH requests.

That said, with two single-quotes it was also necessary to use &LABEL.QUOTEDSTRING, or only one quote would get displayed (That looks like a bug to me).


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report 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     [CLOSED] Escape Character for Subfoots

Copyright © 1996-2020 Information Builders