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)Getting "BAD VALUE IN STYLESHEET FILE " while use the column name as "A10000"

Read-Only Read-Only Topic
Go
Search
Notify
Tools
(solved)Getting "BAD VALUE IN STYLESHEET FILE " while use the column name as "A10000"
 Login/Join
 
Gold member
posted
Hi,

Am getting a Styling issue if I use the column name as 'A10000'
Why my code is throwing error?
Here is my code....
 
TABLE FILE CAR
BY CAR AS 'A10000'
BY COUNTRY AS 'A20000'
BY SALES
BY MPG
ON TABLE SET ASNAMES ON 
ON TABLE HOLD AS AFORMAT
END
-RUN
TABLE FILE AFORMAT
BY A10000
BY A20000
BY SALES
ON TABLE SET PAGE NOPAGE
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT XLSX 
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     UNITS=IN,SQUEEZE=ON,ORIENTATION=LANDSCAPE,HEADALIGN = BODY,$
TYPE=REPORT, FONT='ARIAL', SIZE=10, COLOR='BLACK', STYLE=NORMAL, $
TYPE=TITLE,  FONT='ARIAL NARROW', COLOR='WHITE', STYLE=BOLD, JUSTIFY=CENTER, BACKCOLOR=RGB(102 102 102),$
TYPE=DATA, COLUMN=A10000, JUSTIFY=CENTER, $
ENDSTYLE
END
 

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


8202, 8105M, 7.7.03
 
Posts: 79 | Registered: June 12, 2012Report This Post
Virtuoso
posted Hide Post
Naming column starting with an "A" seems to be a reserved letter. I know about "C" and "N" that are reserved.
Using "Z", it's ok

TABLE FILE CAR
BY CAR AS 'Z10000'
BY COUNTRY AS 'Z20000'
BY SALES
BY MPG
ON TABLE SET ASNAMES ON 
ON TABLE HOLD AS AFORMAT
END
-RUN

TABLE FILE AFORMAT
BY Z10000
BY Z20000
BY SALES
ON TABLE SET PAGE NOPAGE
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
-*ON TABLE PCHOLD FORMAT XLSX 
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     UNITS=IN,SQUEEZE=ON,ORIENTATION=LANDSCAPE,HEADALIGN = BODY,$
TYPE=REPORT, FONT='ARIAL', SIZE=10, COLOR='BLACK', STYLE=NORMAL, $
TYPE=TITLE,  FONT='ARIAL NARROW', COLOR='WHITE', STYLE=BOLD, JUSTIFY=CENTER, BACKCOLOR=RGB(102 102 102),$
TYPE=DATA, COLUMN=Z10000, JUSTIFY=CENTER, $
ENDSTYLE
END

Is there any reason why you need to use "A10000" and "A20000" as column's name ?


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Gold member
posted Hide Post
Columns are coming from DB and we taking it dynamically.
Like converting Rows to columns...


8202, 8105M, 7.7.03
 
Posts: 79 | Registered: June 12, 2012Report This Post
Gold member
posted Hide Post
quote:
N

Every thing taking dynamically, so we couldn't take COLUMN=n1.
Let me try to find out the data which are start with A....(with numeric) in DB and to replace as other letter...


8202, 8105M, 7.7.03
 
Posts: 79 | Registered: June 12, 2012Report This Post
Virtuoso
posted Hide Post
If TABLE ... STYLE chokes on the DB column name, you can use DEFINE to effectively rename it (assuming DEFINE doesn't choke). Or use a business view.
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Guru
posted Hide Post
Does E01, E02, etc. work?

Fernando


Prod WF 8.1.04, QA WF 8.2.03, Dev WF 8.2.03
 
Posts: 278 | Registered: October 10, 2006Report This Post
Platinum Member
posted Hide Post
quote:
Does E01, E02, etc. work?


If I use E10000 and E20000 it works. Perhaps a combo of the previous two replies. Do the initial HOLD using some letter other than A such as I did with the E. Then down the line do a DEFINE setting the value of A10000 to what is held in E10000?


JC
WebFOCUS Dev Studio / App Studio
8.2.01
Windows 7
 
Posts: 146 | Registered: November 09, 2015Report This Post
Expert
posted Hide Post
One method, if you don't mind building a new synonym on the fly, is to interrogate the contents of the HOLD synonym and then insert your own ALIAS equal to the fieldname prefixed with something (I used "Z_") and then reference the ALIAS in your styling. Then WebFOCUS will not complain Smiler

FILEDEF Z_AMASTER DISK Z_AFORMAT.MAS (APPEND
FILEDEF Z_AFORMAT DISK   AFORMAT.FTM
-RUN

TABLE FILE CAR
BY CAR AS 'A10000'
BY COUNTRY AS 'A20000'
BY SALES
BY MPG
ON TABLE SET ASNAMES ON 
ON TABLE HOLD AS AFORMAT
END
-RUN

TABLE FILE SYSCOLUM
PRINT COMPUTE SYNLINE/A4000 = 'FILENAME='||TBNAME||',SUFFIX='||TBTYPE||',$';
      COMPUTE CRLF/A2       = HEXBYT(13,'A1')||HEXBYT(10,'A1');
      COMPUTE SYNLINE/A4000 = 'SEGNAME='||SEGNAME||',SEGTYPE='||SEGTYPE||LJUST(11,FPRINT(SKEYS,'I11','A11'),'A11')||',$';
   BY LOWEST 1 COLNO NOPRINT
WHERE TBNAME EQ 'aformat'
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE SAVE AS Z_AMASTER
END
-RUN

TABLE FILE SYSCOLUM
PRINT COMPUTE SYNLINE/A4000 = 'FIELD='||NAME||',ALIAS=Z_'||NAME||',USAGE='||USAGE||',ACTUAL='||ACTUAL||',$';
   BY SEGNO NOPRINT
   BY COLNO NOPRINT
WHERE TBNAME EQ 'aformat'
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE SAVE AS Z_AMASTER
END
-RUN

TABLE FILE Z_AFORMAT
BY A10000
BY A20000
BY SALES
ON TABLE SET PAGE NOPAGE
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT XLSX 
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     UNITS=IN,SQUEEZE=ON,ORIENTATION=LANDSCAPE,HEADALIGN = BODY,$
TYPE=REPORT, FONT='ARIAL', SIZE=10, COLOR='BLACK', STYLE=NORMAL, $
TYPE=TITLE,  FONT='ARIAL NARROW', COLOR='WHITE', STYLE=BOLD, JUSTIFY=CENTER, BACKCOLOR=RGB(102 102 102),$
TYPE=DATA, COLUMN=Z_A10000, JUSTIFY=CENTER, COLOR=RED, $
ENDSTYLE
END


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
Gold member
posted Hide Post
Thanks to all your reply and suggestions Smiler

I used Tony's way, achieved in different method.

I find the data's which are starting with "A" then am replacing in to another character to load as column and again revert it back for showing the proper title in the same column.

Thanks,
Dev


8202, 8105M, 7.7.03
 
Posts: 79 | Registered: June 12, 2012Report 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)Getting "BAD VALUE IN STYLESHEET FILE " while use the column name as "A10000"

Copyright © 1996-2020 Information Builders