Focal Point
[SOLVED] Passing Dynamic Date Parameter

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

October 15, 2018, 05:17 AM
Chaudhary
[SOLVED] Passing Dynamic Date Parameter
Is it possible to insert a comma in column titles ? I used ASCII value , and this works in HTML but this does not encode in excel format it shows"," in the excel title.
I know that we can use the Subhead with the
  TYPE=SUBHEAD, HEADALIGN=BODY,
property to show the comma in title. but we are using other texts to display in subhead section.

Is there any way to use the comma "," in title
as the text not to split the text.
DEFINE FILE CAR
CAR_COUN/A200 = CAR|'-'|COUNTRY;
END
TABLE FILE CAR
PRINT 
CAR_COUN AS 'CAR,COUNTRY'
BY COUNTRY
  


Using WebFOCUS 7.7.0.3

This message has been edited. Last edited by: FP Mod Chuck,


WF Production :- WF:8.0.0.4, 8.1.05 App-studio/Developer Studio(8.1.x) ,
8.2.0.1M , 8.2.0.2 (App-Studio8.2.x),
InfoAssist/+, InfoDiscovery
Output format:-AHTML, PDF, Excel, HTML
Platform:-Windows 7, 8,10
October 15, 2018, 01:57 PM
Hallway
Try the following:
  
TABLE FILE CAR
PRINT 
COMPUTE CAR,COUNTRY/A200 = CAR|'-'|COUNTRY;
BY COUNTRY
ON TABLE PCHOLD FORMAT EXL07
END



Hallway

 
Prod: 8202M1
Test: 8202M4
Repository:
 
OS:
 
Outputs:
 
 
 
 
October 15, 2018, 02:10 PM
Hallway
Oh, I just found this as well: How to insert commas in a Multiple-line Column Title

So, this works as well:
 
-*USE FOCMODE TO DETECT THE PLATFORM AND
-* SET THE VALUE OF PLATFORM TO 157 FOR MF ELSE 130 FOR WINDOWS
-SET &PVALUE = IF &FOCMODE EQ 'CMS' OR 'CRJE' OR 'MSO' OR 'TSO' OR 'OS' THEN 157 ELSE 130;
-SET &COMMA=HEXBYT(&PVALUE,'A1');


DEFINE FILE CAR
CAR_COUN/A200 = CAR|'-'|COUNTRY;
END
TABLE FILE CAR
PRINT 
CAR_COUN AS 'CAR&COMMA|COUNTRY'
BY COUNTRY
ON TABLE PCHOLD FORMAT EXL07
END 



Hallway

 
Prod: 8202M1
Test: 8202M4
Repository:
 
OS:
 
Outputs:
 
 
 
 
October 15, 2018, 03:33 PM
Chaudhary
Thanks Hallway,

But this does not work it shows
CARéCOUNTRY  
instead of
CAR,COUNTRY  

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


WF Production :- WF:8.0.0.4, 8.1.05 App-studio/Developer Studio(8.1.x) ,
8.2.0.1M , 8.2.0.2 (App-Studio8.2.x),
InfoAssist/+, InfoDiscovery
Output format:-AHTML, PDF, Excel, HTML
Platform:-Windows 7, 8,10
October 15, 2018, 04:02 PM
Hallway
Interesting. What do these variables return on your system
  
-TYPE Client Code Page: &FOCCLIENTCP
-TYPE Language Code Page: &FOCCODEPAGE
-TYPE Operating System: &FOCMODE



Hallway

 
Prod: 8202M1
Test: 8202M4
Repository:
 
OS:
 
Outputs:
 
 
 
 
October 15, 2018, 04:25 PM
Chaudhary
Below are the values,

Client Code Page: 137
Language Code Page: 437
Operating System: WINNT


WF Production :- WF:8.0.0.4, 8.1.05 App-studio/Developer Studio(8.1.x) ,
8.2.0.1M , 8.2.0.2 (App-Studio8.2.x),
InfoAssist/+, InfoDiscovery
Output format:-AHTML, PDF, Excel, HTML
Platform:-Windows 7, 8,10
October 15, 2018, 04:27 PM
Chaudhary
quote:
Try the following:

TABLE FILE CAR
PRINT
COMPUTE CAR,COUNTRY/A200 = CAR|'-'|COUNTRY;
BY COUNTRY
ON TABLE PCHOLD FORMAT EXL07
END


Above solutions works for me.


WF Production :- WF:8.0.0.4, 8.1.05 App-studio/Developer Studio(8.1.x) ,
8.2.0.1M , 8.2.0.2 (App-Studio8.2.x),
InfoAssist/+, InfoDiscovery
Output format:-AHTML, PDF, Excel, HTML
Platform:-Windows 7, 8,10
October 15, 2018, 05:10 PM
Hallway
I'm glad that the first option works for you.

The reason that you are getting the value 'é' in your report is because your environment language is using code page 437. Code page 437 is the original code page of the IBM PC.

You need to be using the Microsoft Windows Codepage 1252 (ANSI) for the SINGLE LOW-9 QUOTATION MARK symbol to work. I don't see a similar character in the code page 437.

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


Hallway

 
Prod: 8202M1
Test: 8202M4
Repository:
 
OS:
 
Outputs:
 
 
 
 
October 17, 2018, 06:05 AM
Wep5622
IBI really should add proper escape sequences for symbols that they attach a meaning to in strings.

This goes for both comma's in column titles as well as less-than and greater-than symbols in headings and subheads.
They did so for ampersands and single quotes, the other symbols really are an omission.

The solutions brought up for cases like these are (usually) partial workarounds at best, they rarely work for all cases (different code pages, different output formats, etc.).
It's a problem that needs a proper fix.


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 :
October 17, 2018, 09:49 AM
Hallway
Very well said. I agree 100%. It's sad that we have to come up with so many work arounds to get desired results.


Hallway

 
Prod: 8202M1
Test: 8202M4
Repository:
 
OS:
 
Outputs:
 
 
 
 
October 17, 2018, 10:38 AM
FP Mod Chuck
You have a legitimate concern, the best I can offer is to open a new feature request to correct these omissions.


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats