Focal Point
[SOLVED] drill down chokes on certain characters

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/1981071103

October 01, 2008, 10:46 AM
MTO-Solutions-Engineering
[SOLVED] drill down chokes on certain characters
in our WF 5.x the drill down feature of a report stops working if the field involved has a full quote (") in it. Also, if there are 2 apostrophes (').

obvious workaround is to remove the bad characters using STRIP function in the master file, however, I have 2 concerns:

(1) can I do STRIP(STRIP(....))?
(2) what other symbols might trigger this problem?

I will start my own experimentation on these, but if anyone has additional comments and/or insights, please share.

Furthermore, is there a solution that will work within the fex directly? The field involved is only referenced in the "Report_Hierarchy:" statement, so I am thinking I can only fix it in Master File.

Finally, is this still a problem in 7.x ?

thanks

Richard

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


MTO
WebFOCUS Dev Studio 5.3.2 (trying to upgrade to 7.x !)
Unix with Win XP front ends
output usually PDF (and some HTML and XLS at times)
October 01, 2008, 11:31 AM
<JG>
STRIP STRIP is not a problem

for your needs use (assuming an A10 column)

newfield/A10=STRIP(10,STRIP(10, oldfield, '''', 'A10'),'"','A10');

(It might be my eyes after I posted but,
Thats 4 single quotes and 1 double quoute surrounded by single quotes)

It's possible that there might be other characters that may be a problem
but the issue is related to text delimiters so it is unlikely.

It's definately fixed in 7.6.6 but I'm not sure about earlier.
October 01, 2008, 01:05 PM
dhagen
MTOSE, you might want to look into using .QUOTEDSTRING instead of stripping out the quotes.


"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
October 01, 2008, 04:35 PM
MTO-Solutions-Engineering
quote:
Originally posted by dhagen:
MTOSE, you might want to look into using .QUOTEDSTRING instead of stripping out the quotes.

.QUOTEDSTRING does not seem to work in Master Files


Richard


MTO
WebFOCUS Dev Studio 5.3.2 (trying to upgrade to 7.x !)
Unix with Win XP front ends
output usually PDF (and some HTML and XLS at times)
October 01, 2008, 04:56 PM
Darin Lee
it doesn't go in the master files. it is appended to the variable (&VAR.QUOTEDSTRING) to indicate special handling of the string. From the manual:

The QUOTEDSTRING suffix on a Dialogue Manager variable applies the following two conversions to the contents of the variable:

Any single quotation mark embedded within a string is converted to two single quotation marks.

Single quotation marks are added around the string.

Dialogue Manager commands differ in their ability to handle character strings that are not enclosed in single quotation marks and contain embedded blanks. An explicit or implied -PROMPT command can read such a string. The entire input string is then enclosed in single quotation marks when operated on by .QUOTEDSTRING.

Note: When using the -SET command to reference a character string, ensure the character string is enclosed in single quotes to prevent errors.


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
October 02, 2008, 01:31 AM
<JG>
QUOTEDSTRING is not a solution to Richards problem.

The issue he is having is in passing a column via his drilldown, not a variable
and it is the parser in the WebFocus server that is breaking on these values.

Quoted string only applies when working with DM variables.
Additionally QUOTEDSTRING does not handle double quotes, which are also causing a problem, at all.
October 08, 2008, 07:28 AM
MTO-Solutions-Engineering
not completely solved yet, and if anyone has better ideas, please reply. thanks.

latest - I have found 5 symbols that break or cripple the OLAP drill down

- quote
- less than sign
- apostrophe
- ampersand
- back slash

For now a DBA is modifying an Oracle view so that those 5 symbols are replaced by an underscore.

I happen to be on a WebFOCUS course today and so am taking the code in to see if the instructor has any additional comments.

Richard


MTO
WebFOCUS Dev Studio 5.3.2 (trying to upgrade to 7.x !)
Unix with Win XP front ends
output usually PDF (and some HTML and XLS at times)
October 08, 2008, 07:45 AM
<JG>
Richard,

Expect to learn a lot of things you may not be able to use,
as training is always based on current release.

As a side note 5.3 is due to be functionally stabalized in Q1 2009
and while this does not mean that you will not get support from hottrack
it does mean that no patches of fixes will be made available.
October 08, 2008, 08:39 AM
Tony A
JG,

I thought that functionally stabalised means any existing patches remain available but don't expect new ones?

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 
October 08, 2008, 08:41 AM
<JG>
Thanks Tony,
I meant to say new patches or fixes
October 08, 2008, 09:29 AM
Tony A
Not at all JG I was just checking my understanding Smiler

T
October 09, 2008, 09:10 AM
tlbrydie2
MTO-Solutions-Engineering,

I'm not sure if you are still having issues with those special characters or not. However what we have done here is use the CTRAN function to convert those special characters from one decimal representation to another. For example we changes the apostrophe {') to a graves (`) symbol.

Hope this helps




Prod: WebFOCUS 7.6.10 MRE
Oracle/Sybase
Test: DevStudio 7.6.6
WF Server 7.6.6
Report Caster 7.6.6
Web Server - Tomcat
MS Windows XP SP2
Output: HTML, Excel 2000 , PDF, CSV, DOC

June 01, 2011, 10:56 AM
cgiuda
I've just run into this problem with a report that I have. I'm running 7702. Ampersands do not seem to be a problem, but when my field contains an apostrophe the drill down will not work. I've tried converting the field using CTRAN, as the previous poster suggested, but I have not yet been able to solve the problem.

Colleen


WebFocus 8104, IBMi (server), Windows 7 (client), iWay 6.1
June 01, 2011, 05:32 PM
j.gross
What's the nature of the failure in the called fex?

Let me guess.

Let's suppose the drilldown is on LNAME, with a value of "O'Hara". The fex issuing the drilldown converts apostrophe to (say) circumflex, so it passes parameter &LNAME with a value of "O^Hara".

The fex receiving this value has to take two measures in order to fish out the O'Hara records --

1. Use CTRAN to convert it back to the original value ("O'Hara").

2. In the report code, use .QUOTEDSTRING, to 'escape' the apostrophe in the value of &LNAME:

WHERE ( LNAME EQ &LNAME.QUOTEDSTRING );

Without #1, no matches
Without #2, syntax error

This message has been edited. Last edited by: j.gross,